commit c1df4fd3c54174ff13b1d5de10e2506e868b28b4
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Mar 17 08:59:02 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit f1e6ace429bb95b417e46fa7e5104790dbca5412)

commit 9f6875173eeccc6d40963df7a96808609ce919ec
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Wed Mar 15 13:32:22 2017 +0100

    Bug#25714674: MYSQL SERVER REMOTE PREAUTH PROBLEM THROUGH INTEGER OVERFLOW
    
    Description: A missing length check for length-encoded string causes
                 problem in preauthorization stage.

commit aeea2571b5bdfc8b69779abe22641a1375e1b421
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Wed Mar 15 13:30:24 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit dbe8c69488c1d7d156d27d02935c1d6e4a2adc18)

commit 546b06299aba8d75b521eb7f7421aa10a756a99b
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Mar 13 19:02:52 2017 +0100

    Revert for the fix for the 'Bug#23593091: MYSQL SERVER MSI - REGISTRY ITEMS LEFT BEHIND WHEN > 1 SERVER VERSION INSTALLED'
    The Server Installer needs some changes to accomodate for this fix so it got postponed for the next release.

commit 58d488712031b06cf26b37e9798206c4a771c4ef
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Mar 3 11:12:26 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit 0f94c14be2276f93b6a98b397111cb475076e0a6)

commit ce9730102288064f8ccd59b2f36dcbc3151383db
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Tue Feb 28 12:40:34 2017 +0100

    Bug#25641417	PACKAGE UPGRADE FROM 5.6 TO 5.7 FAILING ON DEBIAN/UBUNTU PLATFORMS
    
    The mysql_plugin file is in the client package in 5.6, and server in 5.7,
    causing file conflicts on upgrade.
    
    (cherry picked from commit 9fa34bcd92e949d96b2d6a21104d3c1fc7c85d18)

commit 17a7643c385c663c36e325826ac44bfd1cbbe1c8
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Mar 1 13:04:07 2017 +0100

    Bug#25650096	PACKAGE UPGRADE FROM 5.5 NATIVE TO 5.7 THROWS ERRORS ON DEBIAN
    
    When upgrading from native 5.5 packages in Debian we need to reset ownership
    on /var/run/mysqld (owned by root), or the systemd service will throw an error
    because it can't assign it to the mysql user.
    
    (cherry picked from commit 88c2441d41933307208227629481adfe28ac764f)

commit 0797de68fef1319decaa0fd47211ec5b44a0edd9
Author: Oystein Grovlen <oystein.grovlen@oracle.com>
Date:   Wed Mar 1 14:29:48 2017 +0100

    Bug#25650399: DOWNGRADE FROM MYSQL 8.0 TO 5.7 WILL CRASH SERVER
    
    MySQL 8.0 adds a generated column to the two tables mysql.server_cost
    and mysql.engine_cost.  MySQL 5.7 fails if system tables contain
    generated columns.  Hence, downgrade to 5.7 will not work when cost
    tables contain generated columns from 8.0.
    
    This patch is for 5.7 and backports fix to read_cost_constants() from
    8.0.  mysql_system_tables_fix.sql is changed to remove columns
    should they exist.  This will make mysql_upgrade, if run during
    downgrade, restore these tables to its original form.
    
    sql/opt_costconstantcache.cc
       In order for resolving of generated column to work correctly when
       opening cost tables, lex_start() must be called.
    
    scripts/mysql_system_tables_fix.sql
       Add SQL code to remove the columns from 8.0 should they exist.
    
    scripts/mysql_system_tables.sql
       Specify only non-default values in insert statements for cost tables.
       This way mysql_upgrade does not give errors if extra columns exist.
    
    mysql-test/t/opt_costmodel_downgrade.test
    mysql-test/r/opt_costmodel_downgrade.result
       Test to verfiy that 5.7 does not crash should generated columns exist in
       cost tables.  Also verifies that running mysql_upgrade will remove
       the columns.
    
    (cherry picked from commit 6f909b48b8f324079dd9f2a2813312194d17cff1)

commit 89ee0fffbeec144d1034f437fbd09cdf3b1ae699
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Feb 27 16:09:20 2017 +0530

    Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS
    
    Post push test case fix for pb2 issue.

commit 34a0043b162602608489dfc347c55bf0d342dd54
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Feb 27 09:59:09 2017 +0100

    Bug#25611609 LINK WITH DYNAMIC RUNTIME LIBRARIES ON WINDOWS
    
    Patch for 5.7 and up. Add option LINK_STATIC_RUNTIME_LIBRARIES, defalt OFF.

commit bcc6ee089f8fdddcecea411290df0f61c646ca12
Merge: e2e0fd5 4265487
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Feb 27 09:53:17 2017 +0100

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit 4265487dc14a96ce1c906596b61d055569c3160d
Merge: 9935dac 9483d7d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Feb 27 09:51:57 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 9483d7d6f7c54db85d8012b8098883f5710d6b1f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Feb 24 16:20:14 2017 +0100

    Bug#25611609 LINK WITH DYNAMIC RUNTIME LIBRARIES ON WINDOWS
    
    Patch for 5.5 and 5.6
    Use default runtime libraries on windows, i.e. build with /MD

commit e2e0fd5a0f94d96662a418b09d5181927323c8fe
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Feb 24 14:23:38 2017 +0100

    Bug#25611359 REMOVE UNDOCUMENTED CMAKE OPTION WINDOWS_RUNTIME_MD
    
    Remove the undocumented WINDOWS_RUNTIME_MD cmake option.
    Remove /MT from compiler flags, and use default linkage, which is /MD

commit 4fd4264ffda6ed054cecca3e210ca62fbe963bc7
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Feb 24 13:44:27 2017 +0100

    Deb packaging: Postpush fix for #23588977
    
    Using su to drop to mysql user before running database init:
    Works in 5.6 since mysql_install_db is on path (usr/bin), but
    for 5.7+ and mysqld it needs the full path (usr/sbin)

commit 365ed524ec8b22f7c0affdfcf8121d3ff50621df
Merge: cab6d37 9935dac
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Feb 24 13:18:14 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9935dac4f270fca1e1066260473a2a93c829c877
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Feb 24 08:22:34 2017 +0100

    Bug#25525628	UPDATING MYSQL OVERWRITES COLLATION
    
    This marks all the collation xml files as conffiles, meaning
    the user will be asked for confirmation before overwriting them on
    an upgrade (only if they have been edited)
    This is only meant as a workaround, as the user should not be made
    to edit package files to include custom collations

commit cab6d373b5da6a0de592fa20d87947212bd4c746
Merge: 54f056e a5690a4
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Feb 24 13:16:18 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit a5690a47d2af7702511a20c7811013eba3690706
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Feb 22 09:28:49 2017 +0100

    Bug#24517024	SETTING DATADIR IN MY.CNF IS NOT USED IN MYSQL-SYSTEMS-START SANITY CHECK
    
    Important directories are now fetched from config using my_print_defaults.
    Missing directories will only be created if they are under /var/lib (var/log for log file).

commit 54f056eb9fa8aff018da1eda1b7ae64440ddbab4
Merge: bf7afe5 9753dd1
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Fri Feb 24 16:07:31 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9753dd1e65223d906eebb059a230bf13f4be880c
Merge: 0591d82 a6776ca
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Fri Feb 24 16:06:28 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit a6776caf29541a2b244dfa3dfa86019f2d057b6f
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Fri Feb 24 16:04:34 2017 +0530

    Bug#25608828: I_MAIN.VARIABLES-BUG21503595 FAILS
                  SPORADICALLY ON PB2-5.5 FOR LINUX-VALGRIND
    
    Description: Sporadic failure of variables-bug21503595 test
    on pb2-5.5 for linux-valgrind platform.
    
    Fix: This is a issue related to libc and not related to
    MySQL code. During dlclose few blocks of memory left
    unfreed. This is a known issue in libc and needs to be
    suppressed.
    
    Fix: Added a valgrind suppression.

commit bf7afe51deac1d8c5c07d61a4ccb364c2c2a553a
Merge: 5a12ed8 0591d82
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Feb 24 10:12:15 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0591d82162d4ca14eb3e44a72737536aaf48c144
Merge: f597f2c b468809
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Feb 24 10:11:24 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 5a12ed857208d52c69820c0a0eed4b7912fe2127
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Tue Feb 14 23:24:17 2017 +0400

    WL#4745: Remove PROCEDURE ANALYZE
    
    This patch is for 5.7: add a deprecation message.

commit 0ad92f1efbf673793fb0183c22f95354d3ef5dab
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Fri Feb 24 12:21:58 2017 +0530

    Bug#25572504 - PID.SHUTDOWN PRESENT.SERVER WILL NOT RESTART
                   EROR WHEN STARTING >1 MYSQLD_SAFES
    
    DESCRIPTION
    ===========
    Script mysqld_safe isn't bringing the server up when the
    latter is crashing due to some reason. The log file reads
    as given below:
    
    "$$$.pid.shutdown present. The server will not restart."
    
    ANALYSIS
    ========
    Whenever we run "/etc/init.d/mysql stop" (or any other
    command which internally calls it), a "$$$.pid.shutdown"
    file is created to verify a graceful exit. During normal
    shutdown this file is expected to be removed as part of
    cleanup.
    
    As part of code refactoring done in patch to Bug#11751149,
    we missed deleting the "$$$pid.shutdown" file in one of the
    exit cases. As a result of which whenever a crash occurs,
    none of the "$$$.pid" file and "$$$.pid.shutdown" file is
    deleted. Now on finding the latter, the mysqld_safe script
    refuses to restart the server and eventually comes to a halt
    (which by its behaviour is correct!)
    
    The "$$$pid.shutdown" file has to be deleted in this case.
    
    FIX
    ===
    Reverted the part of code change in Bug#11751149, so that
    now the files are deleted in such a case.

commit 9bdeab7f3aa67e980438083dd7f7ae1fa03222d4
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Fri Feb 24 10:53:23 2017 +0530

    Bug#25135304: RBR: WRONG FIELD LENGTH IN ERROR MESSAGE
    
    Description:
    ============
    In row based replication, when replicating from a table with
    a field with character set set to UTF8mb3 to the same table
    with the same field set to character set UTF8mb4 I get a
    confusing error message:
    
    For VARCHAR: VARCHAR(1) 'utf8mb3' to VARCHAR(1) 'utf8mb4'
    
    "Column 0 of table 'test.t1' cannot be converted from type
    'varchar(3)' to type 'varchar(1)'"
    
    Similar issue with CHAR type as well.
    
    Issue with respect to BLOB types:
    
    For BLOB: LONGBLOB to TINYBLOB - Error message displays
    incorrect blob type.
    
    "Column 0 of table 'test.t1' cannot be converted from type
    'tinyblob' to type 'tinyblob'"
    
    Analysis:
    =========
    In Row based replication charset information is not sent as
    part of metadata from master to slave.
    
    For VARCHAR field its character length is converted into
    equivalent octets/bytes and stored internally. At the time
    of displaying the data to user it is converted back to
    original character length.
    
    For example:
    VARCHAR(2)- utf8mb3 is stored as:2*3 = VARCHAR(6)
    At the time of displaying it to user
    VARCHAR(6)- charset utf8mb3:6/3= VARCHAR(2).
    
    At present the internally converted octect length is sent
    from master to slave with out providing the charset
    information. On slave side if the type conversion fails
    'show_sql_type' function is used to get the type specific
    information from metadata. Since there is no charset
    information is available the filed type is displayed as
    VARCHAR(6).
    
    This results in confused error message.
    
    For CHAR fields
    CHAR(1)- utf8mb3 - CHAR(3)
    CHAR(1)- utf8mb4 - CHAR(4)
    
    'show_sql_type' function which retrieves type information
    from metadata uses (bytes/local charset length) to get
    actual character length. If slave's chaset is 'utf8mb4' then
    
    CHAR(3/4)-->CHAR(0)
    CHAR(4/4)-->CHAR(1).
    
    This results in confused error message.
    
    Analysis for BLOB type issue:
    
    BLOB's length is represented in two forms.
    1. Actual length
    i.e
      (length < 256) type= MYSQL_TYPE_TINY_BLOB;
      (length < 65536) type= MYSQL_TYPE_BLOB; ...
    
    2. packlength - The number of bytes used to represent the
    length of the blob
      1- tinyblob
      2- blob ...
    
    In row based replication only the packlength is written in
    the binary log. On the slave side this packlength is
    interpreted as actual length of the blob.  Hence the length
    is always < 256 and the type is displayed as tiny blob.
    
    Fix:
    ===
    For CHAR and VARCHAR fields display their length in bytes
    for both source and target fields. For target field display
    the charset information if it is relevant.
    
    For blob type changed the code to use the packlength and
    display appropriate blob type in error message.

commit 85fb7d45a23e4236c075c19247441193470f397b
Merge: 3db8cbb f597f2c
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Feb 24 08:33:18 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit f597f2c326910939ef420ca2f5c4cb0d8da67758
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Feb 24 08:32:41 2017 +0530

    Bug #25551311   BACKPORT BUG #23517560 REMOVE SPACE_ID.
    
    - Post-push fix to avoid pb2 failure

commit 3db8cbb4003d7f11949397c713f0512c9d102d73
Merge: 49997e1 a67ff2e
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Feb 23 16:43:31 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit a67ff2e42fa9502f83b1a2679cd2534df91fbce2
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Feb 23 16:42:47 2017 +0100

    Bug#25604587 BACKPORT BUG#24947217 TO 5.6 AND 5.7
    
    Change is needed in MySQL 5.6 and 5.7 as well.

commit b4688099dc6bfe54b7786c925d9b9ec4df712130
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Feb 22 20:12:25 2017 +0100

    Bug#25514146: DB_NAME IS IGNORED WHEN CREATING TABLE WITH DATA DIRECTORY
    
    Problem: CREATE TABLE using a fully qualified name with INDEX DIR/DATA DIR
    option reports an error when the current database is not SET.
    
    check_access() was incorrectly called with NULL as the database
    argument in a situation where the database name was not needed for
    the particular privilege being checked. This will cause the current
    database to be used, or an error to be reported if there is no current
    database.
    
    Fix: Call check_access() with any_db as the database argument in this situation.

commit 49997e11fc1cc3aafc294dc54b2298f4be472a83
Merge: 28efb0b 2ea2890
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Feb 23 18:35:21 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 2ea2890cd230a8df1f3313bd2a611d079a12a006
Merge: c6525e7 aaf37a0
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Feb 23 18:30:25 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit aaf37a09ed507cf1723cae680d2facef5ebed526
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Feb 23 18:27:09 2017 +0530

    Bug#23195404  EXCESSIVE MEMORY CAN BE USED BY THE QUOTE()
    			  STRING FUNCTION
    
    Fix:
    =======
    Added code in QUOTE string function to honor max_allowed_packet.

commit 28efb0b8d2ed01c98d91f612af1a55191ecf3f72
Merge: f241644 c6525e7
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Feb 23 16:42:59 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c6525e76c941e8d2cea211c3b4dc7ccb68e4738d
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Feb 23 15:49:46 2017 +0530

    Bug#24976304 WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS TIMEOUT VALUE
    HANDLES SOME INPUTS BADLY
    
    Fixing post push issues

commit f24164490593258720b3096ff53aab1cfcc66301
Merge: 72e307e f003b9a
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Feb 23 11:18:52 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit f003b9ab1229f5cbb49f10626a0c3c02613cb84a
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Feb 23 11:07:14 2017 +0100

    Bug#25603087 NEW PACKAGES BREAKS INSTALL ON FEDORA
    
    Changes in package structure requires larger set of packages to be
    removed to install MySQL server cleanly.

commit 72e307eba9f6b1d1441d4de8126b5c1caa773f21
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Wed Feb 22 22:15:02 2017 +0400

    Bug#25504275: MAIN.NULL TEST IS FAILING ON PB2 FOR 5.7
    
    MTR with the --ps-protocol hides parse-time warnings, that caused a divergence in test results with and without --ps-protocol.

commit 2cd186576dea806420104edb901671d28813ed78
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Feb 22 17:56:03 2017 +0530

    Bug #23046302: COUNT(*) MUCH SLOWER ON 5.7 THAN 5.6
    
    This patch is specific to mysql-5.7.
    
    Post-push fix for failures:
    main.alter, main.gis,
    engines/funcs.ta_add_column2,
    engines/funcs.ta_add_column_first2,
    engines/funcs.ta_add_column_middle2
    
    Currently mysql_inplace_alter_table uses HA_HAS_RECORDS and
    records() function to check if there are any rows in a
    table. But after the previous push in 5.7 for
    Bug #23046302, HA_HAS_RECORDS and records() have been
    removed from innodb. This results in test failures.
    
    mysql_inplace_alter_table needs to know whether the table
    contains any rows, this can be accomplished by a single
    call to ha_rnd_next. In case the table is empty,
    HA_ERR_END_OF_FILE is returned. A new function has been
    added to return a boolean value.
    
    Other result file changes (unrelated to above problem):
    mysql-test/suite/innodb/r/innodb_mysql.result
    mysql-test/suite/opt_trace/r/security_ps_prot.result

commit c7105e7f2eb4dbe816ce98c6a267f9b10867840b
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Feb 22 17:52:39 2017 +0530

    Bug#25041920: GTID AUTO SKIP DOES NOT WORK ON XA TRANSACTION ON SQL THREAD
    
    Fixing a post push test script issue

commit be1e4221757458949a4a89ff8e605d9391a00f26
Merge: d347cdb 5caf4a3
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Feb 22 17:36:22 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 5caf4a3b8f70eeeb3e55cdb9d91f63684a5b1b23
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Feb 22 17:35:58 2017 +0530

    Bug#24976304 WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS TIMEOUT VALUE  HANDLES SOME INPUTS BADLY
    
    Problem: WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS, WAIT_FOR_EXECUTED_GTID_SET
    and MASTER_POS_WAIT functions take an optional "timeout" parameter.
    When supplied with a timeout parameter that is anything other than
    a positive integer or zero, the server behaves oddly.
    
    Analysis: The timeout parameter was treated and read as positive integer.
    i.e., -1 became '0', 0.4 became '0', 1.4 becomes '1'. Hence the
    server was behaving wrongly with the negative and fractional timeout values.
    
    Fix: For negative values,
            > If SQL_MODE is strict mode then it will throw ER_WRONG_PARAMETERS
              error.
            > If SQL_MODE is non-strict value then it returns NULL immediately
              without doing any wait and generates ER_WRONG_PARAMETERS warning.
         For fractional value,
           > it is read as it is and no rounding off to near by integer
             i.e., 1.3 will be read as 1.3 and it will wait for 1.3 seconds.

commit d347cdbbb8c123518d3b4aff18c6a23d56a96847
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Feb 22 12:52:51 2017 +0100

    BUG#25461354: FLOW-CONTROL MAY FAIL TO STOP THROTTLING WHEN THE THRESHOLDS ARE LOW
    
    When flow control is enabled, reaching a minimum flow control quota
    of 1 will make Group Replication not to stop throttling once the
    cause of the throttling is gone. This happens because the integer
    result of 1*1.5 is 1, which makes the quota value a constant 1.
    
    To solve the above issue we ensure that the next computed quota
    value is always bigger than the previous one.

commit 22056cb5eaf4a0829d5be79abf991fcc0e2328a0
Merge: fa0d226 70b1d2b
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 22 15:51:58 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 70b1d2bd397087539f63ea34740e5b5edac21d1c
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 22 15:47:27 2017 +0530

    Bug #25551311   BACKPORT BUG #23517560 REMOVE SPACE_ID
                    RESTRICTION FOR UNDO TABLESPACES
    
    Description:
    ============
    The restriction that required the first undo tablespace to use space_id 1
    is removed. The first undo tablespace can now use a space_id other than 1.
    space_id values for undo tablespaces are still assigned in a consecutive
    sequence.
    
    Reviewed-by: Kevin Lewis <kevin.lewis@oracle.com>
    Reviewed-by: Debarun Bannerjee <debarun.banerjee@oracle.com>
    RB: 14016

commit fa0d226d7eea16c67f4c6c63d0aa64025fb43a3e
Merge: c1098c3 5b807be
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Feb 22 09:17:45 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 5b807be5ad35d2ee8e4e4b1318db6c6d9b17f670
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Feb 22 09:13:50 2017 +0100

    Bug#23588977	CONSISTENCY ISSUES IN DEB PACKAGING
    
    * Replaced /bin/sh with /bin/bash in mysql-common.postinst
    * Moved checking/creation of directories and database from various places to shared helper script
    * Remove full binary path for e.g. mysqld when running in scripts

commit c1098c3ad012203fbab89f1d6b33855dfa614ec4
Merge: 363155b 7e8b225
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Feb 22 11:03:18 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 7e8b225310fd8610ee39e681283019d80bae569c
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Feb 22 11:02:07 2017 +0530

    Bug #25053286: USE VIEW WITH CONDITION IN PROCEDURE CAUSES
                   INCORRECT BEHAVIOR
    
    Issue:
    ------
    This problem occurs when a stored procedure contains a
    query with a view. While resolving the columns in the
    WHERE condition, find_field_in_view insists on creating a
    Item_direct_view_ref object every time an execution
    happens. This object is not destroyed at the end of the
    execution.
    
    In the next execution, a new object is created and will be
    appended to the free_list. Hence the size of the free_list
    is growing and the cleanup phase at the end of each execute
    takes increasingly longer time.
    
    Solution:
    ---------
    This is a regression due to the fix for BUG#19897405.
    
    Ideally the Item_direct_view_ref object (which is related
    to the view's column in WHERE clause) should be created at
    the beginning of every execution and destroyed at the end.
    This doesn't happen because the check related to the status
    (STMT_INITIALIZED_FOR_SP / STMT_EXECUTED) had been removed.
    This check has been re-introduced.
    
    Scenario 1 in BUG#19897405:
    --------------------------
    a) SP is executed--> The view fields are resolved/fixed.
    b) FLUSH TABLE <table-name>.
    c) SP is executed--> Triggers re-prepare--> Query arena
       state is not reset and remains as 'STMT_EXECUTED'.
       Previously created Item_direct_view_ref object is
       destroyed. The view fields are resolved/fixed
       using the execution mem_root. It creates a new
       Item_direct_view_ref object, this is destroyed at the
       end of the execution.
    d) SP is executed--> Server crashes while trying to access
       the resolved view columns allocated on the execution
       mem_root which was freed after execution(c).
    
    Solution to Scenario 1 in BUG#19897405:
    ---------------------------------------
    The root cause of the problem mentioned in BUG#19897405 is
    that when a re-prepare error is raised due to a
    FLUSH TABLE / DROP TABLE, the state of statement arena
    should be switched to STMT_INITIALIZED_FOR_SP. Without
    this, the statement is unaware that previously created
    Item_direct_view_ref have been destroyed after the table
    re-open. While it creates a new Item_direct_view_ref
    object, this is destroyed at the end of the execution.
    Hence the execution that follows will not have any
    Item_direct_view_ref to use.
    
    The fix here is to set the state to STMT_INITIALIZED_FOR_SP
    after the re-prepare error is raised.
    
    
    Problem 2 in BUG#19897405:
    --------------------------
    a) SP is executed--> The view fields are resolved/fixed.
    b) SP is executed--> Gets re-prepare error. Destroys
       Item_direct_view_ref object. At the end "TABLE EXISTS"
       error is raised and state is set to EXECUTED
    c) DROP TABLE <table-created-in-sp>
    d) SP is executed--> Creates new item_direct_view_ref
       object. Destroys the object at the end of the statement.
    d) DROP TABLE <table-created-in-sp>
    e) SP is executed--> Server crashes while trying to
       access the resolved view columns allocated on the
       execution mem_root which was freed after execution.
    
    Solution to Scenario 2 in BUG#19897405:
    ---------------------------------------
    CREATE TABLE ... SELECT statement in an SP requires some
    special handling. The state is always set to
    STMT_INITIALIZED_FOR_SP in such a case.

commit 363155b7e13f3668379f0ba106bcb23ad16225c3
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Wed Feb 22 02:18:39 2017 +0100

    BUG#25549156 - THREAD_POOL VALGRIND FAILURE ON PB 5.7.
    
    Valgrind failures relating to thread pool test suite is
    seen on PB2. The failures are a result of OpenSSL
    library. The fix is to add valgrind suppressions. This bug
    is a backport of the fix for bug#23473989.

commit b9184c773c8c4d6da6e7a14749071e72e3eb348d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Feb 21 08:57:45 2017 +0100

    Bug#25587469 MERGE_LARGE_TESTS NEEDS /BIGOBJ IN 5.7
    
    Add /bigobj for merge_large_tests.cc, to avoid
    "C1128: number of sections exceeded object file format limit" in MSVC

commit 2e53c1b19a0ea8a39969d941acb0b4f56a7c1cc6
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Tue Jan 24 15:31:01 2017 +0100

    Bug #25290001: STATUS VARIABLE MYSQLX_NOTICE_OTHER_SENT IS INCREMENTED MULTIPLE TIMES
    Bug #25289949: ALL MYSQLX.NOTICE.WARNING FRAMES SHOULD INCREMENT NOTICE_WARNING_SENT STATUS VAR
    
    Description:
    Following Mysqlx_notice_warning_sent status variable is incremented when
    X Plugin sends Mysqlx.Notice.Warning frame with "level" field set to
    "Warning". All Mysqlx.Notice.Warning messages should be incrementing
    this status variable. In addition "Mysqlx_on_notice_other_send" status
    variable in some cases is incremented twice. Other problem in this logic
    is that when it "skips" sending the notice it still increments
    the status variable.
    
    Fix:
    The procedure of incrementation of mentioned status variables has been
    rewrote. Additionally, the X Plugin test driver (mysqlxtest) was
    improved for counting incoming messages (separately each type of
    message). This improvement helps build proper assertions for checking
    sent and received messages (e.g. notices). Moreover, loading file with
    macros to mysqlxtest was fixed.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    Reviewed-by: Andrzej Religa <andrzej.religa@oracle.com>
    RB: 15187

commit 511330d6d94822fa6c5ab86ce954aa91e10eb978
Merge: 9498d68 8062fd9
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Tue Feb 21 16:59:49 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 8062fd96cf4f5251de1526d53fdc94a5c74c3348
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Tue Feb 21 16:56:11 2017 +0530

    Bug#25308357: THE CONNECTION CONTROL PLUGIN WILL
                  NOT COMPILE WITH PERFORMANCE SCHEMA
    	      DISABLED
    
    Description: This patch resolves a linking issue
                 which caused failure while loading
    	     the plugin.

commit 9498d68010a363f2363034b702585a2037dcaddb
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Tue Feb 21 11:31:53 2017 +0200

    Addendum 1 to bug #23710632: Fixed doxygen warnings

commit 88fa6d5da9b73ab473f4ee5c790442f84000da5e
Merge: 0f9298f 952063e
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Feb 21 10:03:01 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    Null Merge

commit 952063ec9352cf4bccf81ee07347d36cccf59a74
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Feb 21 10:01:04 2017 +0530

    Bug#25391948: RPL_CHECK_GTID TEST FAILS SPORADICALLY ON
    PB2 - WEEKLY-5.6 FOR LINUX-VALGRIND
    
    Problem:
    =======
    During dlopen/dlclose few blocks of memory left unfreed.
    This is a known issue in libc6 and needs to be suppressed.
    
    Fix:
    ===
    Updated valgrind.supp file with required function call
    stack.

commit 0f9298f7a23fc980bdc33a12470531f29d58120d
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Feb 20 22:51:04 2017 +0530

    Bug#25041920: GTID AUTO SKIP DOES NOT WORK ON XA TRANSACTION ON SQL THREAD
    
    Problem: Server has a mechanism to skip (silently) a GTID
             transaction if it is already executed that particular
             transaction in the past. This GTID transaction
             skipping mechanism is not working properly for XA
             transaction.
    
    Fix: Rows_log_event::do_apply_event and mysql_execute_command is
    already handling the GTID skip mechanism. Adding the same GTID
    skip mechanism along with few other required GTID post commit
    checks to XA_prepare_log_event::do_apply_event function.

commit 7b37f59881382db454bfc315708e4e4afd43df0c
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Feb 20 21:45:21 2017 +0530

    Bug#24806259 PERFORMANCE DEGRADATION WHEN THE SERVER HAS MANY GTIDS
    
    Problem: If a server replicated data from many different servers,
    (can happen over the period of time if slave server's master
    is different time to time, or replication chain is big enough
    that the transactions are travelled from many different Masters
    and reached the node), then FLUSH BINARY LOG command takes
    a lot of time. Since FLUSH BINARY LOG takes lock on binary log,
    it locks all the operations on the server which degrades performance
    of the server during this long time.
    Also > restarting of such this server takes many minutes.
         > setting GTID_PURGED with a big GTID list is taking time.
    
    Analysis:
    Flush binary log is calling  Gtid_state::save_gtids_of_last_binlog_into_table
    which prepares logged_gtids_last_binlog to compute the gtids that needs to be
    stored in the gtid_executed table. During this logged_gtids_last_binlog
    prepare operation, server calls
    Gtid_set::add_gtid_set()
       => Sid_map::add_sid()
             => Sid_map::add_node()
    when ever it finds a new UUID to be added to the set.
    When server calls add_node it has to update many internal structures
    to maintain the consistency of the Gtid_state. Some of these structures are
    declared as dynamic arrays (Preallocated_array).
    Eg:
         > Gtid_set::m_intervals # Array that maps SIDNO to SID;
                                 # the element at index N points
                                 # to a Node with SIDNO N-1,
    
         > Sid_map::sidno_to_hash   # Array that maps SIDNO to SID;
                                    # the element at index N points to
                                    # a Node with SIDNO N-1.
    
         > Mutex_cond_array::m_array # Array of read-write locks.
    
    As the name says, these array lengths needs to be adjusted dynamically when ever
    there is a requirement (no space in the array). In the current code,
    add_node is calling Preallocated_array::reserve(sidno)
    which will make the array adjusted to the size of 'sidno'. The mapped sidno for
    a new UUID is just equal to number of elements in the array + 1. Hence these
    arrays are getting incremented by just one more element.
    These dynamic arrays are adjusted in the following way
                  > Allocate new memory required to fit the new array size
                  > copy element by element from old array to new array location.
    Complexity of the algorithm is O(n^2) where n is the number of new UUIDs that
    needs to be added to these structures.
    
    Similar problem is happening when this server is restarted or when
    we are setting GTID_PURGED with a big gtid list. During these two
    operations, server prepares gtid_executed set by reading the gtids from
    gtid_executed table (or from the gtid text in case SET GTID_PURGED command)
    and server calls add_node for every new UUID.
    If the number of unique UUIDs are in thousands, the restart operation can
    take long time.
    
    Fix: Preallocated_array::push_back has logic inside that it adjust
    these dynamic arrays by doubling the current size when ever it finds
    no space. Hence server should not call "reserve" explicitly and
    let the push_back handle the cash of no space in the array.

commit 57e16c776285b9086153bb4ce2d84f62f0f8d59f
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Fri Jan 27 13:30:52 2017 +0200

    Bug #23710632:  AFTER UPGRADING TO 5.7.13 LOGS
      MANY [WARNING] EVENT 'MYSQL_AUDIT_CONNECT
    
    Currently the information about the error used to try to abort the
    audit command or the COM command is lost under a static message.
    
    This makes it hard to debug the "blocked" messages in the error log.
    The messages now print the underlying error too so that causes for it
    can be prevented.

commit 4a3337f45b6e434bbc31fe78b278a3bccf82b457
Merge: 147e676 4b1ef54
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Mon Feb 20 16:25:51 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 4b1ef547b2e08aacfbb066ae4ae0ce4bd37316fb
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Mon Feb 20 16:24:10 2017 +0530

    Bug #24659861: HANDLE_FATAL_SIGNAL (SIG=11) IN
                   SUBSELECT_HASH_SJ_ENGINE::CLEANUP
    
    ISSUE: For processing the query, creation of myisam
           temporary table fails since the key length in the
           query is larger than the supported length.
           Further in cleanup, variables which are not allocated
           due to the above reason are attempted to free up
           resulting in server to exit abnormally.
    
    FIX: Server will return error if unable to create
         temporary table for query processing.
         Added checks in cleanup to check if variables
         are actually allocated before freeing up.

commit 147e676adda9138bf106a1f98d8702353990fdc3
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Mon Feb 20 14:02:14 2017 +0530

    BUG#22028117 - MYSQLCLIENT DOES NOT RETURN CORRECT
                   MYSQL_INSERT_ID VIA DATABASE HANDLE
    
    DESCRIPTION
    ===========
    mysql_insert_id() does not return correct values after
    performing inserts in a table containing an AUTO_INCREMENT
    field and then performing a SELECT operation.
    The value of insert_id is getting reset to 0 after
    performing SELECT. However, LAST_INSERT_ID() gives the
    correct value.
    
    ANALYSIS
    ========
    An OK packet is sent from the server to the client to
    signal successful completion of a command.
    As of MySQL 5.7.5, OK packes are also used to indicate EOF,
    as EOF packets are deprecated. The packet identifier 0x00
    represents an OK packet whereas the packet identifier OxFE
    represents an EOF packet. The EOF packet has valid values
    for the following fields: packet header, warnings and
    server status. The fields affected_rows and insert_id will
    have valid values only if it was an OK packet and not for
    an EOF packet. Reading the values of the above two fields
    for an EOF packet will result in inconsistent values being
    assigned to the connection handle.
    
    FIX
    ====
    The fix is to assign the affected_rows and insert_id fields
    to the connection handle only if they were read from an OK
    packet. In case of an EOF packet, skip the assignment and
    proceed to the next valid fields. This way we can make sure
    that they don't get wrongly updated in the connection
    handle.

commit 82aa7c9b93b42a0bb30ee042a382527b57f84272
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Fri Feb 17 13:08:30 2017 +0100

    Remove the MSVC CRT libraries from release packages

commit e6bf12fd793de8f183555e79dae042e8246b2f2a
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Feb 17 10:53:34 2017 +0530

    WL#9772: Test and Document Gemalto KMIP Appliance
             with existing OKV_Keyring
    
    Description: This worklog enhances keyring_okv plugin
                 to support KMIP appliance such as KeySecure.
    
                 This worklog also fixes following issue(s).
                 Bug#25540639: KEYRING_OKV DOES NOT GENERATE
    			 RSA/DSA KEYS CORRECTLY in MySQL 5.7
    
    Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com>

commit 53e84b22ee27d61e2f73bafc0b9409efb5f8121f
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Feb 9 18:35:57 2017 +0100

    BUG#25256910: NODE RECOVERY FAILS WITH ERROR_CODE: 1062; HANDLER ERROR HA_ERR_FOUND_DUPP_KEY
    
    On Single Primary Mode Group Replication certification process is disabled,
    only one server accepts writes so there aren't conflicts. Exist one exception
    for when a new primary server is being elected.
    
    This causes a problem for when a new server is entering the group, it doesn't
    know if certification is enable or not in the group as a consequence of the
    primary election mechanism. Hence, queries being rejected in other member can
    be accepted and fail on the new joiner.
    
    This patch solves this problem sending on view change, when a member join or
    leaves, the state of conflict detection of the members. When the member enters
    it will receive the state of conflict detection of all members and activate it
    if one of the members has conflict detection active.

commit 928ab13c0c89a1b9af9aa7c4b3437188e188bfbb
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Tue Feb 14 22:16:35 2017 +0000

    BUG#22186307: RPL.RPL_RELAYROTATE 'ROW':FAILS SPORADICALLY WITH REQUEST TO STOP SLAVE SQL THRE
    
    The test case is missing the "for channel ''" (introduced after the
    multi source replication support) in the error message that should be
    suppressed.

commit 85f782b08afa47d155bf0993070d55867d6d9262
Merge: 698a8cd 0802a79
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Thu Feb 16 09:17:27 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0802a79917329a5b784cfde3e43c2934468c39fd
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Thu Feb 16 09:09:00 2017 +0100

    The default.weekly.basic collection on 5.6 and 5.7 is running more than what is required. Reducing coverage to same as trunk
    
    Reviewed by : erlend.dahl@oracle.com

commit 698a8cd406a1f20c9b03a4ed6028b592c4252a69
Merge: 107945d f1d246c
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Thu Feb 16 12:03:00 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit f1d246c6c86530f521e853802c78a1941a158433
Merge: b322e87 9f885f1
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Thu Feb 16 12:00:39 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 9f885f155ef0293646b78f5e0bc2269a07b4a724
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Thu Feb 16 11:49:13 2017 +0530

    BUG#25164932: MYSQL 5.5: CRASH IN LIBMYSQLCLIENT.SO
    
    Analysis:
    ---------
    Invalid memory access maybe observed when using prepared statements if:
    a) The mysql client connection is lost after statement preparation
       is complete and
    b) There is at least one statement which is in initialized state but
       not prepared yet.
    
    When the client detects a closed connection, it calls end_server()
    to shutdown the connection. As part of the clean up, the
    mysql_prune_stmt_list() removes the statements which has transitioned
    beyond the initialized state and retains only the statements which
    are in a initialized state. During this processing, the initialized
    statements are moved from 'mysql->stmts' to a temporary 'pruned_list'.
    When moving the first 'INIT_DONE' element to the pruned_list,
    'element->next' is set to NULL. Hence the rest of the list is never
    traversed and the statements which have transitioned beyond the
    initialized state are never invalidated.
    
    When the mysql_stmt_close() is called for the statement which is not
    invalidated; the statements list is updated in order to remove the
    statement. This would end up accessing freed memory(freed by the
    mysql_stmt_close() for a previous statement in the list).
    
    Fix:
    ---
    mysql_prune_stmt_list() called list_add() incorrectly to create a
    temporary list. The use case of list_add() is to add a single
    element to the front of the doubly linked list.
    mysql_prune_stmt_list() called list_add() by passing an entire
    list as the 'element'.
    
    mysql_prune_stmt_list() now uses list_delete() to remove the
    statement which has transitioned beyond the initialized phase.
    Thus the statement list would contain only elements where the
    the state of the statement is initialized.

commit 107945ddce8829f5d2c37f1660e9a9818340922f
Merge: dab4f16 b322e87
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Feb 15 17:32:48 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit b322e873392b45f6757f0bd7b57c43db8c14bc59
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Feb 14 11:34:40 2017 +0100

    Bug#25372805 PERFORMANCE SCHEMA 5.6.35 UNITTEST PFT-T FAILING
    
    Unit test pfs-t is failing, with the following error printed:
      not ok 179 - no locker (no thread owner)
    
    The root cause is the test case for sockets,
    which was not updated to follow a change in implementation in the code,
    as the behavior changed.
    
    Now, somehow this test failure went unnoticed,
    and after investigation it turns out that the unit tests
    programs to not return the test exit_status() on exit,
    masking test failures to the automated build scripts.
    
    This fix adjusts the failing test case,
    and fixes all performance schema unit tests
    to properly return the test exit_status().

commit dab4f169e3d702130a76539e4017afb36626b009
Author: Aditya A <aditya.a@oracle.com>
Date:   Wed Feb 15 12:00:07 2017 +0530

    Bug #23046302   COUNT(*) MUCH SLOWER ON 5.7 THAN 5.6
    
    ANALYSIS
    
    This is regression caused due to worklog 6742 which
    implemented ha_innobase::records() which always
    uses clustered index to get the row count. Previously
    optimizer chose secondary index which was smaller in
    size of clustered index to scan for rows and resulted in
    a quicker scan.
    
    FIX
    
    After discussion it was decided to remove this feature in 5.7.
    
    [#rb14040 Approved by Kevin and Oystein ]

commit 17c1393e6fde7c102f6d2b2c231212ffcc49dd1c
Merge: 01d6e6b 90f8c9c
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 15 00:26:12 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 90f8c9cedd94c6f9ba01925f9a551620e8d8d313
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 15 00:23:57 2017 +0530

    Bug #25385590   DROP TABLE CRASHES IF INNODB_FORCE_RECOVERY > 4
    
    - Fixing ibuf_not_empty testcase in mysql-5.6

commit 01d6e6b1f80ab1f4677c41b97ad2abaa91a31621
Merge: 06a4c5e 497a2d0
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Feb 14 12:54:55 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 497a2d0c140d46a66b3ca92136d25bb9e0771e01
Merge: afc4bc3 b687a64
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Feb 14 12:52:28 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit b687a6483515c47c5eeecc5a9c406b9214da6031
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Feb 14 12:25:20 2017 +0100

    Bug#25287707 THE PID-FILE VALUE IS IGNORED IN THE /ETC/MY.CNF OPTION FILE
    
    In SysV initscripts for RPMS [mysqld] section was ignored for some options.

commit 06a4c5e52a56c137c6aec0f07b7c828e28b75f9a
Merge: 12f5046 afc4bc3
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Feb 14 14:48:12 2017 +0530

    Bug #25385590   DROP TABLE CRASHES IF INNODB_FORCE_RECOVERY > 4
    
    - Allow the server to start if innodb force recovery is set to 6
    even though change buffer is not empty
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit afc4bc3050d8a772b3c4c032ac76eeb344d5c19b
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Feb 14 14:34:44 2017 +0530

    Bug #25385590   DROP TABLE CRASHES IF INNODB_FORCE_RECOVERY > 4
    
    Problem:
    ========
     - Drop table assert if innodb_force_recovery is set to 5 or 6.
    For innodb_force_recovery 5 and 6, InnoDB doesn't scan the undo log
    and it makes the redo rollback segment as NULL. There is no way for
    transaction to write any undo log.
    
     - If innodb_force_recovery is set to 6 then InnoDB does not do the
    redo log roll-forward in connection with recovery. In this case,
    log_sys will be initalized only and it will not have latest
    checkpoint information. Checkpoint is done during shutdown even
    innodb_force_recovery is set to 6. So it leads to incorrect
    information update in checkpoint header.
    
    Solution:
    ========
    1) Allow drop table only if innodb_force_recovery < 5.
    2) Make innodb as read-only if innodb_force_recovery is set to 6.
    3) During shutdown, remove the checkpoint if innodb_force_recovery
    is set to 6.
    4) Allow the server to start if innodb force recovery is set to 6
    even though change buffer is not empty.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit 12f50466afdca78ecb82c33b43bb2ca22eea5013
Merge: 1ec9578 9d12abb
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Feb 13 15:20:06 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9d12abb7f8eff84b8025fcf609d73f5acf71406a
Merge: 9a2df30 bad945b
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Feb 13 15:17:41 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit bad945bf5fd9b99e6a4285b95291bd7d64f60d50
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Feb 13 14:55:29 2017 +0100

    Bug#25144379 MYSQLD PROCESS DOES NOT INCLUDE FULL PATH WHEN STARTING MYSQL SERVER
    
    Fix of Bug#25088048 caused paths to be relative, not absolute, this
    proved to be problematic.
    
    Fix is to still ignore current working directory, however switch to
    using full path of basedir, which is set to parent directory of bin/
    directory where mysqld_safe is located.
    
    References to legacy tool mysql_print_defaults are removed, only
    my_print_defaults is used these days.
    
    This will also fix:
      Bug#11745176 (11192) MYSQLD_SAFE ONLY EVALUATES --DEFAULTS-FILE OPTION WHEN IT IS THE FIRST OP
      Bug#23013510 (80866) MYSQLD_SAFE SHOULD NOT SEARCH $MY_BASEDIR_VERSION/VAR AS DATADIR
      Bug#25244898 (84173) MYSQLD_SAFE --NO-DEFAULTS & SILENTLY DOES NOT WORK ANY MORE
      Bug#25261472 (84219) INITSCRIPT ERRORS WHEN LAUCHING MYSQLD_SAFE IN NON DEFAULT BASEDIR
      Bug#25319392 (84263) MYSQL.SERVER (MYSQL SERVER STARTUP SCRIPT) CAN NOT WORK,AND EXPORT SOME ERROR.
      Bug#25319457         MYSQLD_SAFE MIGHT FAIL IF $DATADIR HAS TRAILING /
      Bug#25341981         MYSQLD_SAFE ASSUMES INCORRECT BASEDIR WHEN EXECUTED WITH ABSOLUTE PATH
      Bug#25356221 (84427) MYSQLD_SAFE FAILS TO START WHEN USING A FIFO FOR LOG-ERROR (REGRESSION)
      Bug#25365194 (84447) MYSQLD_SAFE DOESN'T CHECK EXISTENCE OF GIVEN BASEDIR PARAMETER
      Bug#25377815         ERRORS WHILE STARTING MYSQLD_SAFE WITH SYM LINK ENABLED

commit 1ec957870fc5f927fe9c42951551d3c71b89cb5b
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Feb 13 08:08:36 2017 +0530

    Bug #24619222: PASSWORD_LIFETIME IS RESET TO NULL WHEN USER
                   EXECUTES ALTER USER STATEMENT.
    
    Analysis:- The "password_lifetime" value is set to NULL for
    certain set of statements.
    
    Fix:- A check is introduced before resetting the
    password_lifetime value to NULL.

commit c2b35ded61388afa78706cd82d871d755eaa8e59
Merge: 2dffd6c 9a2df30
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Feb 10 11:57:47 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9a2df30e3f830ab470acb759b856ac99c655e814
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Feb 10 11:50:18 2017 +0530

    Bug#25522709 - MAIN.MYSQLHOTCOPY_ARCHIVE AND
                   MAIN.MYSQLHOTCOPY_MYISAM TESTS FAILING
                   IN PB2 IN 5.6
    
    DESCRIPTION:
    ============
    main.mysqlhotcopy_archive and main.mysqlhotcopy_myisam tests
    are failing in PB2 weekly-5.6 on the freebsd platforms.
    
    ANALYSIS:
    ========
    This is caused by an explicit shebang in
    checkDBI_DBD-mysql.pl and in mysqlhotcopy.sh using
    #!/usr/bin/perl which is not correct on a standard install
    of FreeBSD 11. This results in a failure of the script
    execution.
    
    FIX:
    ====
    The fix is to use a portable shebang -> #!/usr/bin/env perl
    instead of #!/usr/bin/perl.

commit 2dffd6c476c478d602beb3cf31f554c6d355a9ea
Author: Mohit Joshi <mohit.joshi@oracle.com>
Date:   Thu Feb 9 15:12:00 2017 +0530

    Added keyring_okv plugin tests to run in following Hudson daily runs:
    daily-57-mtr-run
    daily-57-mtr-run-solaris
    
    Reviewed by:
    Horst Hunger <horst.hunger@oracle.com>

commit 160a38377ddb56f816a8047215cf1d1830a44df0
Merge: 692b77f 1d1907f
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 8 12:03:39 2017 +0530

    Null merge branch 'mysql-5.6' into mysql-5.7

commit 1d1907f3896df76fe2b74d712091151a02e589a1
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 8 12:00:52 2017 +0530

    Bug #24585978       INNODB: ASSERTION TOTAL_RECS > 0 FAILURE
    			IN FILE DICT0STATS.CC
    
    Analysis:
    ========
    There was missing bracket for IF conditon in dict_stats_analyze_index_level()
    and it leads to wrong result.
    
    Fix:
    ====
    Fix the IF condition in dict_stats_analyze_index_level() so that it satisfied
    the if condtion only if level is zero.
    
    Reviewed-by : Jimmy Yang <jimmy.yang@oracle.com>

commit 692b77f1a94cf044e16ed12d7da5f960c80fd013
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Fri Feb 3 15:00:00 2017 +0100

    Bug#25493867 - CMAKE DOESN'T CHECK IF USER HAS SET THE "MYSQLX_TCP_PORT" VARIABLE
    
    Description
    -----------
    WL#9266 defines "MYSQLX_TCP_PORT" cmake/variable which can be used to change the default
    tcp port in X Plugin. Setting this variable doesn't work, cmake overwrites the value to
    33060.
    
    Fix
    ---
    Wrapped MYSQLX_TCP_PORT variable in guard condition.
    
    RB: 15335
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>

commit 8fed26b32ab03bd1a161401c73cb2ff404b08a7e
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Feb 3 13:50:15 2017 +0100

    Bug #25444009: WARNINGS ABOUT UNUSED IMPORTS IN MYSQLX.PROTO
    
    Description:
    The protobuf compiler emits many "unused import" warnings for mysqlx.proto. This causes unnecessary noise when building MySQL.
    
    Fix:
    Remove the unused imports from rapid/plugin/x/protocol/mysqlx.proto.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 15336

commit 91abeb68e11c24fbf636fd130c0d0ba7e1582ca5
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Jan 23 15:03:34 2017 +0000

    BUG#19641482 RPL.RPL_MTS_LOGICAL_CLOCK_RECOVERY FAILS WTH "SERVER FAILED
                 TO DISSAPPEAR"
    
    Problem
    -------
    
    The test case is failing to make the slave server to "disappear".
    
    Analysis
    --------
    
    The "crash_in_a_worker" debug sync point is relying on the fact that the
    workload will be parallelized and reach MTS worker #2, but on slow
    systems the parallelization will not happen and the server will fail to
    "disappear".
    
    Fix
    ---
    
    Ensure that the workload will be distributed by at all the workers
    even on slow systems.

commit d2df232e30a3212510c3124bebeddb94de76b141
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Feb 6 15:54:41 2017 +0530

    Bug#21420180 BINLOG_GROUP_COMMIT_SYNC_DELAY SHOULD BE CONSIDERED
    ONLY WHEN SYNCING BINLOG
    
    Problem: binlog_group_commit_sync_delay is getting applied
    to every binary log commit group.
    
    Analysis: binlog_group_commit_sync_delay variable is introduced to
    control how many microseconds the binary log commit waits before
    synchronizing the binary log file to disk. sync_binlog variable
    is introduced to control the number of binary log commit groups
    to collect before synchronizing the binary log to disk
    
    In the current code, server is waiting for binlog_group_commit_sync_delay
    microseconds after entering into the sync stage of every group
    i.e., every leader of BGC group is waiting the specified time. In case
    of sync_binlog > 1 case or sync_binlog=0 case that every leader will not
    be doing 'sync' and users expectation will be that those groups that are
    doing sync will *only* hit the waiting period.
    
    Fix: wait_count_or_timeout logic should be protected in such a way that
    it will enter only if the sync stage is going to do the sync i.e.,
    check if sync_counter reaches sync_binlog value, only then call the
    wait_count_or_timeout function.

commit 368e4c17af201237e32f18f707c9a6eec04df0ab
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Feb 3 16:46:23 2017 +0100

    BUG#24848125: COLLECTION NAMES WITH DIFFERENT CASING ARE HIDDEN ON UBUNTU 14.04
    
    Post-push fix to address mtr test failure on macos.

commit 0eefab2bd6532b4168945dabb3a9428a6e554b0b
Merge: f0516c0 de2e310
Author: Marc Alff <marc.alff@oracle.com>
Date:   Fri Feb 3 14:51:34 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit de2e310f75ee4166bacd7373c885f008f4997de4
Author: Marc Alff <marc.alff@oracle.com>
Date:   Fri Feb 3 11:29:00 2017 +0100

    Bug#25492129 --PERFORMANCE-SCHEMA-DIGESTS-SIZE=1 LEADS TO SIGSEGV
    
    Before this fix, starting a server with
      --performance-schema-digests-size=1
    would cause a crash.
    
    The root cause is in function fund_or_create_digest().
    
    When scanning the digest array, the code skip entry [0]
    which is reserved for the "NULL" digest,
    and proceeds directly to entry [1].
    
    When --performance-schema-digests-size is 2 or more,
    the record at index [1] exists, but for a size of exactly 1,
    using this record causes a failure.
    
    The fix is ignore record 0 instead of adjusting to record 1,
    and let the while loop operate normally,
    as it accesses records safely already.

commit f0516c00a32becc9dfc5cd01228c27afcc766ce3
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Wed Jan 11 10:29:28 2017 +0100

    BUG#24848125: COLLECTION NAMES WITH DIFFERENT CASING ARE HIDDEN ON UBUNTU 14.04
    
    Description:
    X Plugin hides collections if the names have any letter in
    a different case; for example, flags or Flags or flagS where the OS
    is Linux. Where the OS is Windows, creating flags, Flags, and flagS
    is not permitted.
    
    Solution:
    The 'list_objects' admin command SQL query has been improved to such
    form to take into account a size of letters in names of tables in
    a process of collecting them.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 15173

commit 90d90d3ef29ec83275652dccba002f18252d143c
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Tue Jan 31 16:53:23 2017 +0000

    BUG#25460324 - HAVING AN UNRESOLVABLE HOSTNAME IN GROUP_REPL SHOULD NOT BLOCK GROUP REPLICATION
    
    Description
    ---------------
    Having an unresolvable hostname in group_repl should not block group
    replication from starting
    
    mysql> set global
    group_replication_group_seeds='gr-1:24901,gr-2:24901,gr-3:24901,invalid_hostna
    me:24901';
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> start group_replication;
    2017-01-24T19:22:03.173670Z 5 [Note] Plugin group_replication reported:
    'Group communication SSL configuration: group_replication_ssl_mode:
    "DISABLED"'
    2017-01-24T19:22:03.173775Z 5 [Note] Plugin group_replication reported:
    '[GCS] Added automatically IP ranges 10.0.2.15/24,127.0.0.1/8,192.168.56.3/24
    to the whitelist'
    2017-01-24T19:22:03.202195Z 5 [ERROR] Plugin group_replication reported:
    '[GCS] Peer address "invalid_hostname:24901" is not valid.'
    2017-01-24T19:22:03.202238Z 5 [ERROR] Plugin group_replication reported:
    'Unable to initialize the group communication engine'
    2017-01-24T19:22:03.202243Z 5 [ERROR] Plugin group_replication reported:
    'Error on group communication engine initialization'
    2017-01-24T19:22:03.202289Z 5 [Note] Plugin group_replication reported:
    'Requesting to leave the group despite of not being a member'
    2017-01-24T19:22:03.202293Z 5 [ERROR] Plugin group_replication reported:
    'Error calling group communication interfaces while trying to leave the
    group'
    ERROR 3096 (HY000): The START GROUP_REPLICATION command failed as there was
    an error when initializing the group communication layer.
    
    Analysis
    --------------
    Actually, when an hostname is unresolvable, GR keeps on rotating
    until it reaches a live seed. The problem here resides on the peer
    addresses validation where a all-or-nothing policy is enforced. If
    one address in the list is invalid from IP/Address rules point of view,
    the whole list is deemed invalid
    
    Suggested Fix
    -------------
    Cleanup the seed list, discarding invalid addresses and continue
    only with the valid addresses. GR will still error out if none
    of the provided peer addresses is valid.
    
    Also correct the fact that we don't error out if we have
    invalid addresses in force_members via GR.

commit 42a3b5609f8d4653ccd4086455489ebaf711f0c5
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Feb 1 16:03:57 2017 +0530

    Bug #25385590   DROP TABLE CRASHES IF INNODB_FORCE_RECOVERY > 4
    
    Problem:
    ========
     - Drop table assert if innodb_force_recovery is set to 5 or 6.
    For innodb_force_recovery 5 and 6, InnoDB doesn't scan the undo log
    and it makes the redo rollback segment as NULL. There is no way for
    transaction to write any undo log.
    
     - If innodb_force_recovery is set to 6 then InnoDB does not do the
    redo log roll-forward in connection with recovery. In this case,
    log_sys will be initalized only and it will not have latest
    checkpoint information. Checkpoint is done during shutdown even
    innodb_force_recovery is set to 6. So it leads to incorrect
    information update in checkpoint header.
    
    Solution:
    ========
    1) Allow drop table only if innodb_force_recovery < 5.
    2) Make innodb as read-only if innodb_force_recovery is set to 6.
    3) During shutdown, remove the checkpoint if innodb_force_recovery
    is set to 6.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 15075

commit 113740e84a531ec78662c276cd211172263e9a35
Merge: 5021d04 507063d
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Jan 31 11:55:32 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 507063d12e30a33dceac4194fe560d96164a4c12
Merge: 0eba481 dcb7dce
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Jan 31 11:54:38 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit dcb7dcee3e296fef6dd0a44d9d0479f7ae850ba9
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Jan 31 11:53:42 2017 +0530

    Bug#24619033 - UNABLE TO START MYSQLD DUE TO CHANGES IN
                   MYSQLD_SAFE
    
    DESCRIPTION
    ===========
    Starting a mysql server by running init script:
    /etc/init.d/mysqld start
    
    is failing. This is happening after the changes done in
    script 'mysqld_safe' as a patch to Bug#24464380.
    
    ANALYSIS
    ========
    Say customer's /etc/my.cnf has following content:
    
    [mysqld_safe]
    .
    .
    ledir  = /mysqld_ledir
    mysqld = mysqld_wrapper
    
    Patch to Bug#24464380 prohibits using "mysqld" (and few
    other variables) in config file due to privilege reasons.
    Since mysqld init scripts internally calls 'mysqld_safe'
    script, the existing configuration has started failing.
    
    FIX
    ===
    In the init script, we now pass MYSQLD_OPTS as the first
    argument (expected to be read from /etc/sysconfig/mysqld)
    to mysqld_safe command. This new variable can have all the
    mysqld_safe's special options as a string containing command
    line arguments. For example:
    
    MYSQLD_OPTS=" --ledir=/mysqld_ledir --mysqld=my_wrapper "
    
    NOTE TO THE DOCUMENTATION TEAM
    ==============================
    As mentioned above, the prohibited variables have to be
    moved from /etc/my.cnf to /etc/sysconfig/mysqld as a string
    containing command-line arguments in the form of variable
    MYSQLD_OPTS. We can pass mysqld options as well in this new
    variable which would be further passed to mysqld process.

commit 5021d04f138e2e9df223b76b6aa4ced7fc672786
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Jan 30 16:34:14 2017 +0100

    Cluster packaging for Debian/Ubuntu
    
    * Set different base version for cluster
    * Add cluster to product name
    * Added cmake file with new control packages
    * Added ndb-specific files to packages

commit 6a765ed5bb912e24537ac909b9a633c3173934b9
Merge: 6d09365 0eba481
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Mon Jan 30 04:27:57 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0eba481a4f707b3be39b43b4bb605c9fc4d92b1b
Merge: 4d1b42f aa6a267
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Mon Jan 30 04:24:32 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit aa6a2672e8d2e8ed8670819741959ab29ddc8d31
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Mon Jan 30 03:16:09 2017 +0100

    WL#10287 - Backport WL#7195 to MySQL - 5.5
    
    This is backport of WL#7195 to MySQL-5.5. In 5.5, we
    offload connection authentication from the acceptor
    thread to tp worker threads.
    
    Connection authentication happens in the acceptor thread that
    accepts the connection for thread pool plugin. Connection authentication
    involves exchanging packets with client and disk I/O
    which is time consuming. This can cause other client
    connections to starve and wait in the queue possibly increasing the
    connect latency and decreasing throughput. In the worst case, some
    connections could be dropped. n addition, SSL handshakes are quite
    expensive and can stall connections in the accept queue.
    
    This patch offloads connection authentication when thread pool
    plugin is used for client connection. Each thread group
    shall have a queue of connection_context objects, which represents
    new connections that need to be processed by thread group threads.
    The connection context is composed of THD object & list pointers
    for intrusive queue implementation. Whenever a new connection
    arrives, connection context object is created and added to the
    queue. A new connect handler thread is created or woken up to handle
    the authentication task. The worker thread loop is modified to
    process connection events on connect handler threads in addition to
    checking for query processing events. The initial number of connect
    handler threads is one per thread group and it is restricted to
    a maximum of 4 threads per thread group.

commit 6d093655908b06bddcf23a6173ccdc484db56dc7
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Fri Jan 27 15:08:19 2017 +0530

    Bug #25299309: PASSWORD STILL NOT EXPIRING WHEN IT SHOULD
    
    Description:- User password is not expiring even after
    exceeding the "password_lifetime" limit for a user created
    using work bench tool.
    
    Analysis:- When a user is created using workbench tool, it
    in turn uses "CREATE USER" statement for creating the user
    followed by "GRANT" statement for setting the other user
    attributes.
    This bug is reproducible even in command line if "GRANT" or
    "ALTER" statement is executed for setting user attributes
    like "WITH MAX_QUERIES_PER_HOUR", "MAX_UPDATES_PER_HOUR"
    etc.
    The user's last password change time stamp type is set to
    "MYSQL_TIMESTAMP_ERROR" when executing "GRANT"/"ALTER"
    statement WITH attributes like "MAX_QUERIES_PER_HOUR",
    "MAX_UPDATES_PER_HOUR", "MAX_CONNECTIONS_PER_HOUR" etc.
    Because of this, whenever the user with expired password
    connects, server will not be able to check whether the
    user's password is expired or not(since the user's last
    password change time stamp type is set to
    MYSQL_TIMESTAMP_ERROR ). So the server is allowing the
    expired user to connect even after password expiry.
    
    Fix:- A check is introduced before setting the user's
    last password change time stamp.

commit e1f9f0fd3fcd9efa16b3709d0d1f9aa0c269f442
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Jan 26 11:13:32 2017 +0100

    Bug#25443178 GROUP REPLICATION, BROKEN ONE-DEFINITION RULE
    
    The global variable cfg_app_xcom_st* the_app_xcom_cfg; should be declared
    "extern" in xcom_cfg.h and then *defined* in xcom_cfg.c
    This broke the one-definition rule.

commit b4932ef39bdc6cc8789ceef9d24e4494fb491c5a
Merge: 0f9410b 4d1b42f
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Jan 26 12:06:08 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 4d1b42fb32dcb19dfc51494f77785519a01fd2bc
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Jan 26 12:03:20 2017 +0100

    Deb packaging: Added support for Debian 9 and Ubuntu 17.04

commit 0f9410bee55e8f535cbe8253d01db0a97a92b9e8
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Jan 26 11:28:15 2017 +0100

    BUG#25298987: GR USER REMAINS IN THE SERVER AFTER PLUGIN UNINSTALL
    
    The GR user (_gr_user) that is created by the plugin at install shows different
    behaviors if the plugin is started or not.
    
    When uninstall the plugin without starting it remove group replication user.

commit d5625566a7b883313c28939828a299d48bc25f20
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Jan 25 16:11:37 2017 +0530

    Bug#24007040 - MYSQLDUMPSLOW ON MYSQL 5.7 DOESN'T FOLLOW
                   DATETIME FORMAT CHANGE
    
    Post push fix to address test script failure.

commit f775387927464913af8e034c20b4fd6366bfd69a
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Jan 25 10:28:51 2017 +0100

    BUG#25247574: CHANGE ALL USES OF WAIT_CONDITION.INC TO WAIT_CONDITION_OR_ABORT.INC
    
    Test failures getting un-noticed around wait_condition timeout.
    It has been observed some wait_condition timeouts were recorded in result files
    resulting in failures getting un-noticed.
    
    Example, if table is expected to have 3 rows.
    Failure of not 3 row will get skipped, due to Timeout message recorded in result file.
    
    Reason: Jobs were not failing due to variable used to skip failures.
    
    To solve it, wait conditions now abort at timeout.
    
    Post changes 4 test failures have been recorded. 3 are being tracked in BUG#25392468.
    Additional changes have been done to show GR debug information at time of failure.

commit 919ea22e3c9cb96b45265439678e0cbafe90bae4
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 24 14:39:43 2017 +0100

    Bug#24504155 BUILD MEMCACHED WITH SOLARIS STUDIO 12.5 AKA 5.14
    
    Backport to 5.7
    
    Do not set any -std=xxx for the developer studio compiler, that would lead to:
    innodb_engine.so: symbol __sync_add_and_fetch: referenced symbol not found

commit 595b06288e33a782817674dcceb0b069be3f1335
Author: Aditya A <aditya.a@oracle.com>
Date:   Tue Jan 24 18:52:14 2017 +0530

    Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS
    
    Post push fix to enable valgrind during big-test option

commit b871b53f05f77803cbf0db00735f2de237a20039
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Jan 24 16:51:40 2017 +0530

    Bug#24007040 - MYSQLDUMPSLOW ON MYSQL 5.7 DOESN'T FOLLOW
                   DATETIME FORMAT CHANGE
    
    DESCRIPTION:
    ============
    On MySQL 5.7, make_iso8601_timestamp() is used to build
    timestamp string. This format is different from the
    timestamp format of the previous versions. As a result,
    mysqldumpslow cannot identify each entry and fails to
    summarize the queries in slow-query-log.
    
    ANALYSIS:
    =========
    The script's earlier regex pattern was not able to parse
    the iso8601 timestamp format. As per the iso8601 timestamp
    format, the timestamp can either be in the form of
    YYYY-MM-DDTHH:MM:SS.SZ or
    YYYY-MM-DDTHH:MM:SS.S[+-]HH:MM
    
    FIX
    ====
    Change the regex pattern for the timestamp according to the
    iso8601 timestamp pattern. mysqldumpslow script should then
    be able to summarize the queries correctly.

commit 59fb9ea1cc0bafc1b65148887d11619f5ca2dfc1
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Jan 20 15:17:10 2017 +0100

    Bug#25395543 MYSQL 5.7 DOES NOT COMPILE WITH LIBWRAP/TCP_WRAPPER
    
    Some versions of /usr/include/tcpd.h lack proper function prototypes.
    Add cmake checks for this, and do explicit function pointer cast if needed.

commit 791cab07d88a737d58093fcbed6bc8f5ede4de8c
Merge: 8f68f13 0e2a6d8
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Jan 23 18:21:28 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0e2a6d890025e4317cd00421e62780aab5776397
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Jan 23 17:48:14 2017 +0100

    Bug#23593091: MYSQL SERVER MSI - REGISTRY ITEMS LEFT BEHIND WHEN > 1 SERVER VERSION INSTALLED
    
    Fixed a bug, where WiX would assign the same GUID to registry key components belonging to different products.
    WiX is set generate GUID automatically based on the registry key path: 'SOFTWARE\MySQL AB\[ProductName]'.
    Unfortunatelly the [ProductName] variable would be evaluated after GUID generation.

commit 8f68f13d472a06941c5056ebc41adb965150582f
Merge: 0d2bb43 fb538b9
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Jan 23 09:41:25 2017 +0000

    Merge branch 'mysql-5.6' into mysql-5.7

commit fb538b9f4d3c83ceeb0fdc9a07020450d379dc0c
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Fri Jan 20 09:53:01 2017 +0000

    BUG#24801209: RPL_GTID.RPL_GTID_TEMP_TABLE FAILS SPORADICALLY ON PB2
                  IN DIFF_TABLES.INC
    
    Problem
    -------
    
    The MTR test rpl_gtid.rpl_gtid_temp_table fails sporadically on
    pushbuild on perpush as well as weekly/daily runs due to diff-
    erence in table contents between master and slave being reported
    by "include/diff_tables.inc".
    
    Analysis
    --------
    
    The issue seems to be caused because of missing synchronization point
    between master and slave after the workload and before the master/slave
    diff tables check.
    
    Fix
    ---
    
    Added a master/slave synchronization before table diff checks.

commit 0d2bb43677011aaddfce9aec2ef22bc4216186ad
Merge: 0f8403f dcbae0e
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 16:58:04 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit dcbae0ee89c9f25fd1986b28b13057f4ba8d66c0
Merge: 00ff8a5 e0798b3
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 16:51:44 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit e0798b3b11271cb9bfbe503db55ca8affa054400
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 16:48:24 2017 +0100

    Bug#18374703 COMPILATION ERROR WITH -DENABLE_DEBUG_SYNC=0 AND -DWITH_DEBUG=ON
    
    Post-push fix.
    Problem cmake without explicit build type was broken on windows.
    Fix: do not test for build type, always extend CMAKE_C[XX]_FLAGS_DEBUG

commit 0f8403fb121183345dbfc88fef455a3e27e4f32e
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Mon Jan 16 13:07:58 2017 +0100

    BUG#25392280 - X PLUGIN RELEASES CONNECTIONS WHICH WERE NOT INITIALIZED WHEN VALIDATION OCCURS
    
    Description
    ===========
    Race condition that occurs seldom disconnects a client before
    the authentication process is finished, even the client has a lot time left.
    
    Analyzis
    ========
    Race condition occurs when ngs::Servers verification callback goes
    through all connected clients and in mean time a new client is beeing accepted.
    Accepting takes some CPU cycles to mark the client as accepted and in
    mean time the verification callback checks the clients data. The data aren't
    valid thus the ngs::Server tries to release the object.
    
    RB: 15100
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Andrzej Religa <andrzej.religa@oracle.com>

commit b591dbebf42db94cbef9783e936f68cd566fce66
Merge: 9c266ce 00ff8a5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 10:28:46 2017 +0100

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit 9c266ce5af762152998fde0a7630f13671f732d4
Author: Darshan M N <darshan.m.n@oracle.com>
Date:   Tue Jan 17 14:47:52 2017 +0530

    BUG#24686908 INNODB SHOULD HAVE A MECHANISM TO CHECK IF ALL PFS KEYS ARE
    REGISTERED WITH PFS
    
    Issue:
    ======
    For the mutexes and rwlocks to be instrumented their respective PFS keys
    must be registered with the PFS. It's possible that this registration is
    missed and as a result the respective mutexes/rwlocks are not instrumented.
    So it helps if there's a way to check if all the defined PFS keys are
    registered with PFS.
    
    Fix:
    ====
    Figure out the number of PFS keys defined and number of PFS keys registered
    with PFS and abort startup in debug build if the count doesn't match.
    
    RB: 14913
    Reviewed-by: Jimmy Yang <Jimmy.Yang@oracle.com>
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>

commit 00ff8a59bf33598bfa7c1899b411f78df1205f1f
Merge: c1455fc e7353ab
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 10:09:37 2017 +0100

    NULL Merge branch 'mysql-5.5' into mysql-5.6

commit e7353abc414e9bbe4acadb0db04401c13e842906
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 10:06:04 2017 +0100

    Bug#18374703 COMPILATION ERROR WITH -DENABLE_DEBUG_SYNC=0 AND -DWITH_DEBUG=ON
    
    The combination cmake -DENABLE_DEBUG_SYNC=0 -DWITH_DEBUG=ON fails to build.
    
    Fix: Remove option ENABLE_DEBUG_SYNC.

commit 2951ae4bb8ab0329eab7e268353d368a4ef60f70
Merge: 27e8356 c1455fc
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Jan 17 08:44:02 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit c1455fcefd271cf70d06117477cc81b9b61b121d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Jan 12 12:50:04 2017 +0100

    Bug#25384295 ADD SUPPORT FOR SOLARIS STUDIO 12.6 AKA 5.15 TO MYSQL 5.6
    
    Parse new output from 'CC -V'

commit 34cde940c1eddfc569eeb26b83738d28e2294e44
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Jan 12 12:49:22 2017 +0100

    Bug#18374703 COMPILATION ERROR WITH -DENABLE_DEBUG_SYNC=0 AND -DWITH_DEBUG=ON
    
    The combination cmake -DENABLE_DEBUG_SYNC=0 -DWITH_DEBUG=ON fails to build.
    
    Fix: Remove option ENABLE_DEBUG_SYNC.

commit 27e83566537e747eee65a5dd16f2e14abeb2d2a8
Merge: 9b78199 a148334
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Tue Jan 17 12:33:08 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit a148334628a3da0b0a1196eaafd9bc9adf73b643
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Tue Jan 17 12:30:59 2017 +0530

    Backport of Bug#24666839 INNODB'S ESTIMATE FOR ROWS-IN-TABLE CAN RETURN
    ROWS=1 DUE TO A RACE CONDITION to mysql-5.6
    
    This bug also affects mysql-5.6 . As per customer's request it needs to
    be fixed in 5.6 too.
    
    Rb: 14929
    Approved by : Jimmy Yang <jimmy.yang@oracle.com>

commit 9b781995b3b9a4fea8a70b9ca5b5de83b3a70265
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Jan 17 11:42:33 2017 +0530

    Bug#24732452 - CA NOT VERIFIED WITH VERIFY_CA
    
    DESCRIPTION
    ===========
    While establishing connections from the client to the server
    with SSL capability, connections succeed even if ssl-mode is
    VERIFY_CA or VERIFY_IDENTITY and the client does not
    provide CA certificate.
    
    ANALYSIS
    ========
    If ssl-mode is VERIFY_CA or VERIFY_IDENTITY, it must
    either verify the server certificate against the
    specified CA or fail the connection. Without providing
    the CA or its path, the default CA is used and the
    connection is still established.
    
    FIX
    ===
    We strictly enforce that the CA certifcate or its
    path is provided if ssl-mode is one of the above two.
    Otherwise, we throw an appropriate error message
    and abort the connection.

commit c94ff766a6d10db06f7153d50e942116b9bd0f8e
Merge: 7b11f2b 354a859
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Mon Jan 16 16:05:09 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    Change-Id: Ifa947c1ac73008b3211a635185e2daf9f0e7bf48

commit 354a859e062f9a63f66260906f53e471e12c1f7a
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Mon Jan 16 16:00:41 2017 +0100

    Bug#25391997: BACKPORT SUPPORT FOR NEWER LIBEDIT TO MYSQL 5.6
    
    Backport for mysql-5.7 to mysql-5.6 of:
    
    Bug#23708332: -DWITH_EDITLINE=SYSTEM BREAKS WITH LIBEDIT-20160618-3.1
    
    Add CMake check for the new editline completion API
    and based on the result, use already existing code
    for it in the mysql client.
    
    Change-Id: I8a9a721de24eef6359d3285cffd9745a8894ea4b
    (cherry picked from commit 41480c0bacf8f354610825856b5c66b8516da607)

commit 7b11f2b621e89e3c025306a744e9de9789c4167e
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Thu Jan 5 08:24:38 2017 +0100

    WL#8396: Deprecate and remove temp-pool
    
    This patch marks the temp-pool startup option as deprecated.
    
    The patch is for MySQL 5.7.

commit 749eb3d0541b8a127f009dc80aca60734f65ee8d
Author: Aditya A <aditya.a@oracle.com>
Date:   Thu Jan 12 17:07:08 2017 +0530

    post push fix after
    Bug#25340520 SERVER BOOTSTRAP READ STALE NDBCLUSTER FRM FILES
    
    Post push pb2 test fix to modify the search pattern in
    innodb-status-output.test which was not detected after the
    Bug25340520 caused removal of some line from the error log.

commit 0c5501e3eac73b1f6df38b056b57edfce033eda9
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Thu Jan 12 15:45:30 2017 +0530

    Bug#20228478 - ON REPLICATION SLAVE ALTER USER FAILING FOR
                   USER WITH SHA256_PASSWORD PLUGIN
    
    Post push fix to address test script failure.

commit 6a47c5c8c9ff9c2c311ece4ebb4a7c3abfe39fb7
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Jan 11 15:18:33 2017 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL PRIVILEGES
    
    Post-push fix: Mask out GRANT warning which does not appear in embedded mode.

commit 914cf636b3191c7b8f93c7f8d9971ffb5eac43ff
Author: Elżbieta Babij <elzbieta.babij@oracle.com>
Date:   Wed Jan 4 16:03:36 2017 +0100

    Bug #25297593 -	BUILD ON NATIVE FEDORA 25 FAILS DUE TO DEPRECATED LZ4_COMPRESS_LIMITEDOUTPUT
    
    As stated in lz4.h file: "These functions are planned to start generate warnings by r131 approximately"
    Using LZ4_compress_default instead.
    
    RB#15011
    Reviewed by Kevin Lewis

commit 218ebfeae0a39401b52b287a9a18b425bcac9616
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Jan 10 10:48:56 2017 +0530

    Bug #24793413   LOG PARSING BUFFER OVERFLOW
    
    Problem:
    ========
    During checkpoint, we are writing all MLOG_FILE_NAME records in one mtr
    and parse buffer can't be processed till MLOG_MULTI_REC_END. Eventually parse
    buffer exceeds the RECV_PARSING_BUF_SIZE and eventually it overflows.
    
    Fix:
    ===
    1) Break the large mtr if it exceeds LOG_CHECKPOINT_FREE_PER_THREAD into multiple mtr during checkpoint.
    2) Move the parsing buffer if we are encountering only MLOG_FILE_NAME
    records. So that it will never exceed the RECV_PARSING_BUF_SIZE.
    
    Reviewed-by: Debarun Bannerjee <debarun.bannerjee@oracle.com>
    Reviewed-by: Rahul M Malik <rahul.m.malik@oracle.com>
    RB: 14743

commit 9bbf346834c43698a84d619c658b57a4c9d566dc
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Jan 10 07:44:52 2017 +0530

    Bug #25171608: REFERENCE TO ALIAS FROM SUBQUERY IN SELECT
                   LIST CAUSES INCORRECT BEHAVIOR
    
    Issue:
    ------
    In the following query:
    
    SELECT alias2
    FROM (SELECT ... alias1, (SELECT alias1 .... ) alias2
          FROM t1) X ;
    
    Optimizer marks all the columns that are required from a
    derived table depending on the select list. In this process
    it decides that alias1 is not required and the
    corresponding subquery can be removed. This creates a
    problem because alias2 still requires alias1.
    
    Solution:
    ---------
    While marking all the columns that are required from
    derived table make sure that any column, including those
    from the preceding part of the select list, are also
    marked.

commit 1ca6b12f8780c0b7730737cf414d3f8d0ebf4a25
Author: Rahul Malik <rahul.m.malik@oracle.com>
Date:   Mon Jan 9 15:02:55 2017 +0100

    bug#25330449: ASSERT SIZE==SPACE->SIZE DURING BUF_READ_AHEAD_RANDOM
    
    problem description:
    
    test was failing for innodb_page_size 16K and 32K.
    key_block_size=1 is not supported for 16K and 32K
    page_size.
    
    fix:
    
    removed support for innodb_page_size 16K and 32K.
    
    follow up fix for bug#25330449
    
    reviewed by :
    satya bodapati  <satya.bodapati@oracle.com>
    
    excluded support for

commit 0cf44b21f8d7b8d54e4320562eb74c4242c43a4b
Merge: 9ceb712 20440a6
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Jan 9 18:45:39 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 20440a623068b646b52b5d4241434ddc0931ea47
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Jan 9 18:43:58 2017 +0530

    Bug #25348787	BUILD BREAK IN INNODB WHEN COMPILING WITHOUT PERFORMANCE SCHEMA
    
    PROBLEM
    
    struct pfs_os_file_t is defined as below:
    Struct pfs_os_file_t {
    os_file_t mfile
    
    ifdef UNIV_PFS_IO
    
    struct PFS_file* m_psi
    
    endif
    
    }
    
    Because of such a definition of the struct pfs_os_file_t if we compile
    without PFS the functions that would then be accepting only os_file_t
    would fail with invalid conversion error.
    
    Solution
    
    Have added macros that would pass file struct when PFS is enables
    file.m_file if PFS is not enabled.
    
    Reviewed By :Jimmy Yang <Jimmy.Yang@oracle.com>
    Reviewed By :Marc Allf  <marc.alff@oracle.com>
    Rb: 15020
        15031
        15032

commit 9ceb7128d67214c6b08e7fb6af0952fd1cb23c69
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Jan 6 16:08:07 2017 +0100

    Bug#25358460 CONFUSING CMAKE OUTPUT FOR CMAKE_GENERATOR = NINJA
    
    The output at the end of a cmake run is confusing when using -G Ninja
    The code assumes that anything other than "Makefiles" is a multi-config build
    like Xcode or Visual Studio
    
    Fix: Treat anything other than Xcode and "Visual Studio" as single-config.

commit 0b1108abb368ed6a882c85cd8c892a5ae735f6a4
Merge: 38a5772 cbc500e
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Jan 9 10:37:59 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit cbc500eee3fc924e32cae0c55075933674bb1ca5
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Jan 9 10:36:32 2017 +0530

    Bug #24671968: WHEN THE OPTIMISER IS USING INDEX FOR
                   GROUP-BY IT OFTEN GIVES WRONG RESULTS
    
    Post-push fix.
    
    On trunk and 5.7: re-arranging statement to avoid problems
                      with "--query_cache_type=1".
    On 5.6: additional issues with explain output.

commit 38a57729178492ebc71c99b17a00c4e84a5a1f74
Merge: d404f6a b653a06
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sun Jan 8 10:16:45 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit b653a069fa675733e0ad54dda1fe8cbb3f5025bb
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sun Jan 8 10:15:18 2017 +0530

    Bug #24671968: WHEN THE OPTIMISER IS USING INDEX FOR
                   GROUP-BY IT OFTEN GIVES WRONG RESULTS
    
    Issue:
    ------
    This problem occurs under the conditions:
    1) WHERE clause contains a dependent subquery.
    2) Table has a secondary index on the columns in the SELECT
       list, followed by the columns in the subquery.
    3) Group-by / DISTINCT allows the query to pick loose index
       scan.
    
    Based on conditions 1 and 2 optimizer chooses not to create
    range tree for the WHERE clause due to the dependent
    subquery.
    
    This effectively means that without the range tree, the
    function evaluating the possibility of loose index scan
    will assume that the WHERE clause doesn't contain anything
    that would disqualify it from using this approach. Hence
    the loose index scan structures are created by taking only
    the SELECT list into account. This gives incorrect results
    since a smaller prefix of the index is chosen for loose
    index scan.
    
    Solution:
    ---------
    When there is a WHERE condition without a range tree, any
    reference to the columns in the secondary index that are so
    far unused, will disqualify the query from using loose
    index scan. But this check is not performed for subqueries
    and this has been corrected.

commit d404f6ac666487e98440888349ed23e293bfa009
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sat Jan 7 09:11:21 2017 +0530

    Bug #25343335: DERIVED TABLE SELECT LIST'S REFERENCE TO
                   ALIAS CAUSES INCORRECT BEHAVIOR
    
    Issue 1:
    --------
    In the following query:
    
    SELECT *
    FROM (SELECT 1 AS alias1, (SELECT alias1 .... ) AS alias2
          FROM t1) X ;
    
    Notice that alias1 is created in the select list as the
    first column and is then referred to in the second column:
    alias2.
    
    This is not part of the SQL standard, but Mysql allows this.
    
    alias2 is resolved to the alias1 which is also part of the
    same select-list. Once the resolution is completed, the
    derived table is merged into the outer query. Derived
    tables don't have an outer context because they can't refer
    to an outer query. So during the merge, the derived table's
    outer context (which is null) is assigned to the subqueries
    in the select list of the derived table. This is harmless
    during conventional execution since the resolution is
    already complete.
    
    The problem arises during PREPARE/EXECUTE. The prepare
    phase completes the first round of resolution and then
    proceeds to merge the derived table, thus resultig in a
    loss of the outer contexts for alias2. But the EXECUTE
    step needs to redo the resolution. Since the outer context
    of alias2 has been set to NULL, it is unable to resolve the
    alias1 present in the inner-most subquery.
    
    
    Solution to Issue 1:
    --------------------
    In SELECT_LEX_UNIT::exclude_level(), while assigning outer
    context to the subqueries of a derived table, use the outer
    select's context, instead of the derived table's outer
    context.
    
    
    Issue 2:
    --------
    In the following query:
    
    SELECT alias2
    FROM (SELECT ... alias1, (SELECT alias1 .... ) AS alias2
          FROM t1) X ;
    
    Here only alias2 is referred to in the outer query's select
    list. This query works as expected in a conventional
    execution.
    
    But in a PREPARE/EXECUTE scenario, the EXECUTE step fails
    complaining that it is unable to resolve alias1. Notice
    that inorder to resolve alias2, alias1 is required. At the
    end of the PREPARE phase, the derived table is merged into
    the outer query. At the beginning of the EXECUTE phase, the
    context->first_name_resolution_table (which is where the
    query is first supposed to look to resolve a field) is
    mistakently changed to t1 instead of X. So, in order to
    resolve alias1, the table t1 is looked up unsuccessfully.
    Hence the failure.
    
    Solution to Issue 2 on mysql-trunk:
    -----------------------------------
    This problem was fixed by the refactoring in Bug#21522980.
    
    Solution to Issue 2 on mysql-5,7:
    ---------------------------------
    The change of
    context->first_name_resolution_table happens in
    setup_natural_join_row_types, which shouldn't actually be
    called since this is a single table query.
    
    The fix is a partial backport of Bug#21522980.
    
    
    A further problem was identified when the derived table
    contains a join. This will be addressed as part of
    Bug#25355534 . This issue occurs on both trunk and 5.7.

commit de3c153efa7cbefe142503110f99257801ee9906
Merge: 6ccf620 0601d75
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Jan 6 19:51:53 2017 +0530

    Bug #25167032   CRASH WHEN ASSIGNING MY_ERRNO - MISSING
                    MY_THREAD_INIT IN BACKGROUND THREAD
    
    Merge branch 'mysql-5.6' into mysql-5.7

commit 0601d75039fd906c9f4f7c39ea8b2f6ca7b2bf7e
Merge: 0418f91 12c6456
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Jan 6 19:50:47 2017 +0530

    Bug #25167032   CRASH WHEN ASSIGNING MY_ERRNO - MISSING
                    MY_THREAD_INIT IN BACKGROUND THREAD
    
    Merge branch 'mysql-5.5' into mysql-5.6

commit 12c645627d6872ea0c6821a641dcdd8eec1782bf
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Jan 6 19:48:54 2017 +0530

    Bug #25167032   CRASH WHEN ASSIGNING MY_ERRNO - MISSING
    		MY_THREAD_INIT IN BACKGROUND THREAD
    
    Description:
    ===========
    Add my_thread_init() and my_thread_exit() for background threads which
    initializes and frees the st_my_thread_var structure.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
    RB: 15003

commit 6ccf6209cdc4ebff40e589a6a44a50ee6fc5976a
Merge: ad04387 0418f91
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Jan 6 18:21:14 2017 +0530

     Updated copyright year in user visible text

commit 0418f919717cd40d6f623865730ae2ac2bab840c
Merge: adfcaed 63649d8
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Jan 6 18:18:22 2017 +0530

     Updated copyright year in user visible text

commit 63649d813fa2380328712979cef817ad6a74709e
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Jan 6 18:15:13 2017 +0530

     Updated copyright year in user visible text

commit ad043875ab52912131f595ff159cb755eb65b2dc
Author: rahul malik <rahul.m.malik@oracle.com>
Date:   Fri Jan 6 10:37:07 2017 +0100

    BUG#25330449 ASSERT SIZE==SPACE->SIZE DURING BUF_READ_AHEAD_RANDOM
    
    Problem:
    
    During read head, wrong page size is used to calcuate the tablespace size.
    
    Fix:
    
    Use physical page size to calculate tablespace size
    
    Reveiwed-By: Satya Bodapati
    RB: 14993

commit 3b054aed15976cbec4ff2853d5b4c7cb989a8e47
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Wed Jan 4 15:46:35 2017 +0100

    Bug#25340520 SERVER BOOTSTRAP READ STALE NDBCLUSTER FRM FILES
    
    Regression caused by WL#9457: Deprecate support for non-native partitioning.
    
        This WL inplements the following changes:
    
        1. The bootstrap implementation in the server is extended with
           support for executing a single query.
        2. While restarting the server, an I_S query is executed to
           trigger a scan of all .FRM files in the server.
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    This patch moves the bootstrap reading of the FRM files introduced
    above to after the ndb cluster storage engine has been set up.
    
    This will guarantee that the ndbcluster setup code gets the
    chance to invalidate and recreate any FRM files belonging
    to tables possibly being altered while we 'were away'.

commit 9383a4e0dc216946535044bb49dbd10dc8771598
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Jan 4 15:41:07 2017 +0200

    Bug #23210850 VERSION_TOKEN TEST OCASIONALLY STOPS THE SERVER
    
    Bot the version token plugin and the related UDFs are using a common
    global data structure.
    This structure was disposed of at UNINSTALL PLUGIN and a flag was set
    but between disposing of the structure and setting the flag there was
    a raise window if some other thread calls the UDF afgain.
    Also the global rw lock protecting the common structure was never
    disposed of.
    
    Fixed by introducing a check for the global structure right inside the
    lock.
    Added a C++ class whose destructor releases the RW lock when the
    shared object is unloaded at the last UDF/plugin uninstallation.
    
    Updated the tests to mention the error name next to the error code.

commit d033fea008b6e3a1f42d37597ea184005c4f2e4f
Merge: 4177ed7 adfcaed
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Jan 4 18:55:32 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit adfcaedea967065b67ee7a88f0f41af54059d59e
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Jan 4 18:53:48 2017 +0530

    Post push fix for build issue due to push of Bug#25220118

commit 4177ed77a25277de9c52b030b1e7e10c775c1a78
Merge: 39e53e1 54d7700
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Jan 4 16:33:49 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 54d77006d0ef23e6cc7330cad3507dc6e77d2b50
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Jan 4 16:29:08 2017 +0530

    Bug #25220118	 CHANGE THE TYPE NAME OS_PFS_FILE_T INTRODUCED LATELY TO
    PFS_OS_FILE_T
    
    Changing the typename os_pfs_file_t to pfs_os_file_t to be in accordance
    with the naming convention.

commit 39e53e1a8412096d087995791394999da7ecbd4d
Author: Aditya A <aditya.a@oracle.com>
Date:   Wed Jan 4 14:34:38 2017 +0530

    Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS
    
    PROBLEM
    
    When truncating single tablespace tables, we need to scan the entire
    buffer pool to remove the pages of the table from the buffer pool.
    During this scan and removal dict_sys->mutex is being held ,causing
    stalls in other DDL operations.
    
    FIX
    
    Release the dict_sys->mutex during the scan and reacquire it after the
    scan. Make sure that purge thread doesn't purge the records of the table
    being truncated and background stats collection thread skips the updation
    of stats for the table being truncated.
    
    [#rb 14564 Approved by Jimmy and satya ]

commit cdfe544f3c837a070a48d6d21819d510f2d38f18
Merge: 0751b17 33aa5e3
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Jan 4 11:37:03 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 33aa5e3131d6832eca2940f72ab9740fdeadf5e4
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Jan 4 11:16:53 2017 +0530

    BUG#25187670: BACKPORT BUG#19894382 TO 5.6 AND 5.7.
    
    Backport from mysql-trunk to mysql-5.6 and mysql-5.7.
    
    Bug#19894382 SERVER SIDE PREPARED STATEMENTS LEADS TO POTENTIAL
                 OFF-BY-SECOND TIMESTAMP ON SLAVE
    
    For temporal type input parameter (as time, timestamp and
    datetime) of server side prepared statement, the fractional
    second part is ignored while preparing the query string.
    Executing such query string at slave is resulting in a time
    value difference between master and server.
    
    For server prepared statement, the parameters passed for
    execution are parsed and Item_param objects are created for
    it. While preparing Item_param for temporal types time,
    timestamp and datetime, precision for fractional second part's
    (Item_param::decimals) is set to "0" always. Because of which
    while preparing query string with param values, fractional second
    value is ignored. So execution of such prepared statements uses
    correct values but query string formed is incorrect. Hence
    difference in temporal type value is observed on usage of query
    string.
    
    Fix:
    --------
    If temporal types time, timestamp and datetime has fractional
    second part then setting microseconds (6 digit) precision for
    the Item_param.

commit 0751b1742e26239972cec17ddfcc4ac214290a65
Merge: 439a6d8 e4940fc
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Tue Jan 3 09:12:35 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit e4940fcee95f30afafda028b66e5b699ac707be1
Merge: 9358d4a cdad2b3
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Tue Jan 3 09:10:30 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit cdad2b3a25506e7814c9eece71f575ac54249058
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Tue Jan 3 09:06:19 2017 +0100

    Bug#25335897: Modified the year of the date value from 2017 to 2037 in first event.

commit 439a6d80652c1b38ebcf896427cb23b615eb8c9a
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Dec 19 11:12:22 2016 +0000

    BUG#25231367: INCONSISTENT WORKER_ID BETWEEN RPL P_S TABLES AND MTS ERROR MESSAGES
    
    This patch fixed a small issue in MTS error generation that was
    displaying the non-internal worker ID instead of the same that is
    externalized in P_S replication tables.

commit cfee66e03256a7234a036ab22717c5f8146bad4c
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Dec 28 19:01:46 2016 +0530

    Bug #23219499   CONCURRENT UPDATE DOESN'T APPLY IN VIRTUAL
                    INDEX DURING TABLE REBUILD
    - Post-push fix for compilation error.

commit 7302b30836f9e6c464157cbdf3f133f5a459051d
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Dec 28 17:44:16 2016 +0530

    Bug #23219499	CONCURRENT UPDATE DOESN'T APPLY IN VIRTUAL
    		INDEX DURING TABLE REBUILD
    
    Problem:
    =======
    Concurrent update dml statement doesn't reflect in virtual index during
    inplace table rebuild. It results mismatch value in virutal index and
    clustered index. Deleting the table content tries to search the mismatch
    value in virtual index but it can't find the value. During log update
    apply phase, virtual information is being ignored while constructing
    the new entry.
    
    Solution:
    =========
    In row_log_update_apply phase, build the entry with virtual column
    information. So that it can reflect in newly constructed virtual index.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
    RB: 14974

commit d6e79dd6e0c836f6ba05836272a5c9be01be1016
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Fri Dec 9 12:45:46 2016 +0000

    BUG#24822686: MTS WORKER IS NOT REPORTING ALL ERRORS THAT STS APPLIER
                  DOES
    
    Problem
    -------
    
    The MTS slave applier is stopping because of an (injected) error, but is
    reporting no useful information for troubleshooting about was has
    happened.
    
    Analysis
    --------
    
    All issues detected when applying binary log events are reported using
    rli->report().
    
    When an issue is not reported by the log event being applied, there is a
    workaround to report the issue using rli->report().
    
    The workaround was missing in the MTS applier.
    
    Fix
    ---
    
    Added the same workaround present on STS applier to the MTS applier.
    
    Also, this patch also refactored many test cases that were expecting
    the generic MTS error code from the slave to expect the specific issue
    error code instead.

commit 7df347d28e58c7ab685340bd207520a3ec1d5b01
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 22 15:22:06 2016 +0530

    Bug#22838596: RPL.RPL_KEY_ROTATION TEST UNSTABLE
    
    Description: Replaced a sleep call with call to
                 sync client with master.

commit 4f35fec483e33c268db3535ec902daa35c51755e
Merge: 7da15b1 9358d4a
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Thu Dec 22 14:59:06 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9358d4a3b88369a6743c6323d5f33c88efec5dfd
Merge: 7771853 686d761
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Thu Dec 22 14:57:00 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 686d761e8017809cf6c35d591b85d320a38158bc
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Thu Dec 22 14:56:02 2016 +0530

    Bug#11751149 - TRYING TO START MYSQL WHILE ANOTHER INSTANCE
                   IS STARTING: CONFUSING ERROR
    
    DESCRIPTION
    ===========
    When mysql server processes transactions but has not yet
    committed and shuts down abnormally (due to crash, external
    killing etc.), a recovery is due from Storage engine side
    which takes place the next time mysql server (either
    through mysqld or mysqld_safe) is run.
    
    While the 1st server is in mid of recovery, if another
    instance of mysqld_safe is made to run, it may result into
    2nd instance killing the 1st one after a moment.
    
    ANALYSIS
    ========
    In the "while true" loop, we've a check (which is done
    after the server stops) for the existence of pid file to
    enquire if it was a normal shutdown or not. If the file is
    absent, it means that the graceful exit of server had
    removed this file.
    
    However if the file is present, the scripts makes a plain
    assumption that this file is leftover of the "current"
    server. It misses to consider that it could be a valid pid
    file belonging to another running mysql server.
    
    We need to add more checks in the latter case. The script
    should extract the PID from this existing file and check if
    its running or not. If yes, it means an older instance of
    mysql server is running and hence the script should abort.
    
    FIX
    ===
    Checking the status of process (alive or not) by adding a
    @CHECK_PID@ in such a case. Aborting if its alive. Detailed
    logic is as follows:
    
    - The mysqld_safe script would quit at start only as soon
    as it finds that there is an active PID i.e. a mysql server
    is already running.
    - The PID file creation takes place after InnoDb recovery,
    which means in rare case (when PID file isn't created yet)
    it may happen that more than 1 server can come up but even
    in that case others will have to wait till the 1st server
    has released the acquired InnoDb lock. In this case all
    these servers will either TIMEOUT waiting for InnoDb lock
    or after this they would find that the 1st server is
    already running (by reading $pid_file) and would abort.
    - Our core fix is that we now check the status of mysql
    server process (alive or not) after the server stops
    running within the loop of "run -> shutdown/kill/abort ->
    run ... ", so that only the script who owns the mysql
    server would be able to bring it down if required.
    
    NOTE
    ====
    Removed the deletion of pid file and socket file from entry
    of the loop, as it may result in 2nd instance deleting
    these files created by 1st instance in RACE condition.
    Compensated this by deleting these files at end of the loop
    
    Reverted the changes made in patch to Bug#16776528. So
    after this patch is pushed, the concept of mysqld_safe.pid
    would go altogether. This was required as the script was
    deleting other instance's mysqld_safe.pid allowing multiple
    mysqld_safe instances to run in parallel. This patch would
    fix Bug#16776528 as well as the resources would be guarded
    anyway by InnoDb lock + our planned 5.7 patch.

commit 7da15b18d6d2f2c6daf5341fb5c3817c02676990
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Tue Dec 20 20:33:57 2016 +0100

    Bug#24413450 FIREWALL PLUGIN STOPS RECORDING EVENTS WHEN AUDIT_LOG INSTALLED
    
    Issue:
    ======
    Every audit pluign defines mask of events, which are handled by the plugin.
    Sum of all event mask is maintained in the global mysql_global_audit_mask
    array variable. If one plugin is interested into all general events, its plugin
    mask is [ 0xf, 0x0, ... ]. A plugin that is interested into all connection
    events, its plugin mask is [ 0x0, 0xf, 0x0, ... ].
    A global mysql_global_audit_mask variable holds sum of all values: [ 0xf, 0xf, 0x0, ... ]
    
    Audit plugins are loaded into a client session on demand. If a server is about
    to signal specific event, plugin acquisition is performed, which loads audit
    plugins that match requested mask and plugin mask. Acquired plugin mask is copied
    into a session's audit_class_mask, which is invalid and lead to a situation that
    prevents other audit plugin to load, because audit_class_mask already contains
    that events:
    
    Plugin 'A' is interested into general events [ 0xf, 0x0, ... ]
    Plugin 'B' is interested into general and connection events [ 0xf, 0xf, 0x0, ... ]
    
    Connection events are generated as first events, so plugins that handle connection
    events are loaded first (Plugin 'B'). Session mask will contain following mask,
    after the plugin is loaded:
    audit_class_mask: [ 0xf, 0xf, 0x0, ... ]
    
    When general event is about to be generated, audit_class_mask is compared against
    mysql_globa_audit_mask array. Because they are the same, no action is performed,
    which is obviously wrong, because Plugin 'A' has not been acquired by the session.
    
    Fix:
    ====
    During acquisition of the plugins that handle specific events, audit_class_mask
    contains events of the plugin currently loaded, but excluding bits of audit
    plugins not loaded. This guarantees that other audit plugis could be loaded
    later on demand.
    
    Acquisition of the plugins that handle connection events, will result in
    acquisition of the Plugin 'B'. audit_class_mask will contain [ 0x0, 0xf, 0x0, ... ],
    which represents acquired plugins, excluding plugins that have not been acquired.
    Generation of the general event will result is reacquisition of the plugins
    and the audit_class_maks will contain [ 0xf, 0xf, 0x0, ... ] eventually.
    
    Reviewers:
    ==========
    
    Georgi Kodinov <georgi.kodinov@oracle.com>
    Harin Vadodaria <harin.vadodaria@oracle.com>

commit ba3a6d0c793a1047abfaef9533ce95d0e0804470
Merge: e2e8f8f 7771853
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Dec 20 10:18:16 2016 +0100

    Null-merge from 5.6.

commit 7771853a1b3fa08dfdbeac7923641472f7ab14c2
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Dec 20 10:14:14 2016 +0100

    Bug #25076862: BACKPORT PATCHES FOR BUG#24788778 (STRNXFRM() REGRESSIONS) TO MYSQL 5.6
    
    Backport of Ole John's proposed fix for #24788778, to 5.6,
    after it was successfully added to 5.7. (The patch we actually
    ended up with in trunk relied on C++, and ctype-utf8.c wasn't
    moved to C++ before 8.0.) His original commit message follows:
    
    SEVERE REGRESSION IN MY_STRNXFRM() FROM MYSQL-5.5 -> 5.6
    
    Enhance the unicode-pad code to encourage the compiler
    to loop-unroll. That improves the performance of
    padding of utf8 char strings by 2x - 4x
    
    This patch only takes care of utf8 space padding.
    There seems to be similar oportunities for optimizing
    other character encodings using the same technique as in this
    patch.
    
    Patch does not handle the regression caused by
    my_strnxfrm_unicode() being called instead of
    my_strnxfrm_mb_bin() as in mysql 5.5.
    
    Change-Id: Ieb1475c7f69794dc77c9b8c94d571622efb9e91a

commit e2e8f8fa8f71465aabb9cee439d64165e91bd156
Author: Filipe Campos <filipe.campos@oracle.com>
Date:   Wed Dec 14 18:18:04 2016 +0100

    BUG#25163241 - MYSQL SERVER: VARIABLE LENGTH ARRAY IN XCOM CAUSING BUILD ERROR
    
    Description:
    ------------
    The -Werror=vla option causes the MySQL Server 5.7.17 build to stop with a
    variable length array error.
    
    Analysis and Suggested Fix:
    ---------------------------
    Ported existing XCom patch where the variable length array that raised the
    error, is replaced by a dynamically allocated array pointer.

commit f4f80e11a89ac43edcb0e3245af734e4086e3a60
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Dec 19 17:28:18 2016 +0530

    Bug #24666839 INNODB'S ESTIMATE FOR ROWS-IN-TABLE CAN RETURN ROWS=1 DUE
    TO A RACE CONDITION
    
    PROBLEM
    
    While updating stats there could be a possible race condition while the
    table stats are reset and then table is overwriiten with new stats might
    leading a thread to read estimate rows as 1(wrong value after reset)
    which would let optimizer choose a wrong plan for execution.
    
    FIX
    
    Simple fix from rb#14204 in trunk is backported to 5.7 that would reset
    the stats only when the index is corrupted and the stats would be
    directly overwritten otherwise.
    
    Reviewed-by: Jimmy Yang <Jimmy.Yang@oracle.com>
    RB: 14929

commit 2130b18b1231fde969db49df14138621a101796f
Merge: 9b63bc7 ae3c048
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Dec 19 12:08:48 2016 +0100

    null-merge from 5.6

commit ae3c048e42551a0d830440d9a32d974038da35f4
Merge: 6e7727a f28cf16
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Dec 19 12:04:54 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit f28cf166727f150fcc1e06a3cdcf640e5846ef14
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Dec 19 10:15:54 2016 +0100

    Bug#13344753 MYSQL_SECURE_INSTALLATION SCRIPT DOES NOT CHECK USER INPUT
    
    Loop until valid answer is given. Variants of y,yes and
    n,no and blank (meaning default) are considered valid.

commit 9b63bc789845b2d473d8c82a8ac1e57469d10c1d
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Thu Dec 8 08:46:24 2016 +0100

    WL#9874: Deprecate and remove the replace utility
    
    This patch adds a deprecation warning when starting the 'replace'
    utility. This is the 5.7 version of the WL.

commit f25415451316b5db7f665cf0741ecba5a683e773
Merge: f4fb641 6e7727a
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Dec 16 17:21:36 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 6e7727a041b7ba55e007f8e90428e55c3bd7fea8
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Dec 16 17:17:26 2016 +0530

    WL#8885: Introduce a delay in authentication process
             based on successive failed login attempts
    
    Post push fix: Fix for ASAN issue.

commit f4fb64136d00454a07a71eb8dfa7e2cc06eb81d0
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Dec 16 11:30:54 2016 +0100

    Bug #23748432 MYSQLPUMP FULL LOGICAL BACKUPS UNUSABLE WITH GTID REPLICATION
    
    Post push fix. On solaris set-gtid-purged even after being set to correct
    value, comparison of this vairable with its repective enum value is failing.
    Corrected the condition with explicit typecasts.

commit bfcd9aafc5ec8db3ac767ce2427686b17cd0dc9d
Author: Darshan M N <darshan.m.n@oracle.com>
Date:   Fri Dec 16 12:14:38 2016 +0530

    BUG#25251082 DISABLING CERTAIN MACROS IN INNODB RESULTS IN COMPILATION
    ERRORS
    
    Issue:
    ======
    Disabling macros such as UNIV_PFS_MUTEX/UNIV_PFS_RWLOCK/UNIV_PFS_THREAD
    which are defined in InnoDB throws errors during compilation.
    
    Fix:
    ====
    Fix all the compilation errors.
    
    RB: 14893
    Reviewed-by: Jimmy Yang <Jimmy.Yang@oracle.com>
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>

commit 48be58cabae41361eb51fba3e10ed22807cc788d
Merge: 54e8adf 425b017
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Fri Dec 16 14:32:56 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 425b0170d4c27679c5f0b41b9a075a1530aaf2e5
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Fri Dec 16 14:30:05 2016 +0530

    Bug #25244533 : PERFORMANCE_SCHEMA DIGESTS THE SAME QUERY TO MULTIPLE DIFFERENT
                    DIGESTS
    
    Issue:
    Part1:    When there are ';' in the queries, it is assumed that there are
              multiple queries and therefore parsing is done for each individual
              query one after another. During this process, digest storage was not
              reset properly and digest text of old query was seen.
    
    Fix:      Reset digest storage beforem start parsing next query.
    
    Part2:    In case of multiple queries, when a ';' is seen, its decided that
              current query ends here and a new query is about to start. But when
              delimiter is set to something else, for the first query, ';' is
              passed to digest code. As a result, ';' was seen in digest text and
              the digest created for the query is different from the digest which
              would have been created without the ';' in the query.
    
    Fix:      Parser passes NUL (i.e. 0) to digest code when the first query parsing
              is over. Therefore, in digest code when a NUL (0) is encountered, check
              the last token. If it is ';', pop it out so that it is not included in
              query digest text and digest.

commit 54e8adf680c8c9d57e7416be647365673b3701b2
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Dec 16 12:07:10 2016 +0530

    Bug #25171608: REFERENCE TO ALIAS FROM SUBQUERY IN SELECT
                   LIST CAUSES INCORRECT BEHAVIOR
    
    Reverting the fix due to failure with ps-protocol.

commit 21a89ef380890f960e74e39d114e3ea4cc65ed5a
Merge: 0d7ec95 a50c10d
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Dec 15 12:48:59 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit a50c10d4646f3b3e464b0dcf5f0bfd7fc0caa6dd
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Dec 15 11:00:08 2016 +0100

    Bug#25258829	USE GNU INSTALL UTILITY INSTEAD OF MKDIR+TOUCH+CHOWN IN DEBIAN/UBUNTU PACKAGING
    
    To avoid any potential race conditions, replace all create+chown commands with gnu install

commit 0d7ec959b283335f910c39b514b22dae6e416fd3
Author: Darshan M N <darshan.m.n@oracle.com>
Date:   Thu Dec 15 16:50:44 2016 +0530

    BUG#25053705 INVALID I/O ON TABLE AFTER TRUNCATE
    
    Issue:
    ======
    The issue is that if a fts index is present in a table the space size is
    incorrectly calculated in the case of truncate which results in a invalid
    read.
    
    Fix:
    ====
    Have a different space size calculation in truncate if fts indexes are
    present.
    
    RB:14755
    Reviewed-by: Shaohua Wang <shaohua.wang@oracle.com>

commit 7a66434c5a4401dddb41c25419b31f6795e23857
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Thu Dec 15 15:38:06 2016 +0530

    Bug #24585978	INNODB: ASSERTION TOTAL_RECS > 0 FAILURE
    		IN FILE DICT0STATS.CC
    
    Analysis:
    ========
     There was missing bracket for IF conditon in dict_stats_analyze_index_level()
    and it leads to wrong result.
    
    Fix:
    ====
     Fix the IF condition in dict_stats_analyze_index_level() so that it satisfied
    the if condtion only if level is zero.
    
    Reviewed-by : Jimmy Yang <jimmy.yang@oracle.com>

commit 71fda334574670d6b71fa85758f1748e1207806a
Merge: 9282c12 838f3fa
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 15 15:32:58 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 838f3fa66c9b5b1296b819a59470c34ac1c8ab5d
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 15 15:29:42 2016 +0530

    WL#8885: Introduce a delay in authentication process
             based on successive failed login attempts
    
    Post push fix: Fixing non-ps build issues.

commit 9282c12ef9df9fc46437892628d63e981b72e57c
Author: Dhruthi K V <dhruthi.k.v@oracle.com>
Date:   Thu Dec 15 15:17:02 2016 +0530

    Bug#24391859 ADD MTR TEST TO CHECK BASIC DML OPERATIONS ON GR USING X PROTOCOL
    
    Post push test fix.

commit 6631c8f46cc5351c828861f52e8c383ec0d0bcda
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Thu Dec 15 15:08:55 2016 +0530

    Bug #25175249   ASSERTION: (TEMPL->IS_VIRTUAL && !FIELD)
                           || (FIELD && FIELD->PREFIX_LEN ? FIELD
    
    - Post push fix to resolve doxygen and werror build.

commit 0cf4c611e132e5632cc39e052ddb6ee27751674c
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Thu Dec 15 14:40:35 2016 +0530

    Bug #24714857: FOUND_ROWS() RETURNS 1 WHEN NO ROWS FOUND
    
    This patch is specific to mysql-5.7
    
    ISSUE: FOUND_ROWS() returned 1 even though the previous
           select did not return any rows. This was happening
           because the statistics returned by InnoDB returned
           1 for the select even though there are no rows.
           The same count was further returned by FOUND_ROWS().
    
    FIX: In InnoDB, while determining statistics, check whether
         its for temporary table. If its temporary table,
         do not increment the row count.

commit fcac7250811e93635f328f6be8c40a8acae3f3cb
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Thu Dec 15 12:55:16 2016 +0530

    	Bug #25175249	ASSERTION: (TEMPL->IS_VIRTUAL && !FIELD)
    			|| (FIELD && FIELD->PREFIX_LEN ? FIELD
    
    Problem:
    =======
    During end range comparison, secondary index field number is passed instead
    of clustered index field number and eventually leads to fetch the wrong field.
    
    Solution:
    ========
    Pass the correct clustered index field number as well as secondary index
    field number during end range comparison.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
    RB: 14783

commit 196acf64bd54e8578fe3357675ce0794229765ba
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Dec 13 12:01:59 2016 +0100

    Bug#25229424 ENABLE C++03 BY DEFAULT FOR DEVELOPERSTUDIO12.5 MYSQL
    
    Check compiler version, use -std=c++03 rather than stlport by default for
    developerstudio12.5
    
    Developer studio uses more stack space than gcc,
    so a couple of mtr tests needed adjustment.
    
    Fix broken code for stack check on sparc (sp_head::execute)
    
    Allocate more DEFAULT_THREAD_STACK when using developerstudio on sparc.
    
    Backport:
    Bug#25148549 REVISIT COMPILER FLAGS FOR ORACLE DEVELOPER STUDIO
    
    Change-Id: I0aad1a4f549c40e66541ebc2ed8add075e1365c3

commit a1ca6a93b96f2e27a43a682e1114fccc2164d372
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Mon Dec 12 13:57:15 2016 +0100

    Bug #25076862: BACKPORT PATCHES FOR BUG#24788778 (STRNXFRM() REGRESSIONS) TO MYSQL 5.6
    
    Backport of Ole John's proposed fix for #24788778, to 5.7.
    (The patch we actually ended up with in trunk relied on C++,
    and ctype-utf8.c wasn't moved to C++ before 8.0.)
    His original commit message follows:
    
    SEVERE REGRESSION IN MY_STRNXFRM() FROM MYSQL-5.5 -> 5.6
    
    Enhance the unicode-pad code to encourage the compiler
    to loop-unroll. That improves the performance of
    padding of utf8 char strings by 2x - 4x
    
    This patch only takes care of utf8 space padding.
    There seems to be similar oportunities for optimizing
    other character encodings using the same technique as in this
    patch.
    
    Patch does not handle the regression caused by
    my_strnxfrm_unicode() being called instead of
    my_strnxfrm_mb_bin() as in mysql 5.5.
    
    Change-Id: I17f6f2c7635851903ea7cf9b5f6e4146517c6e40

commit 0a2b0b7f3f44163686392347026d8fc2648c81cb
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Fri Nov 4 14:29:05 2016 +0100

    Bug #25246254: BACKPORT --SUMMARY-OUTPUT TO MYSQL 5.7
    
    Add an option to MTR that outputs the result summary to a file.
    This can then be used by CI systems (e.g. Jenkins) to send in email when a
    build fails, so that one doesn't have to go click to see what went wrong.
    
    Clean backport from trunk.
    
    Change-Id: I243dd86f104dcf75369c23380d5c30559e92a3ec

commit 7d251d64c7e63768026fa5215112496444c2adee
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Dec 14 18:42:46 2016 +0530

    Bug#25222337    FIELD NAME IS NULL IN NEWLY ADDED VIRTUAL INDEX
                      FOR NEWLY ADDED VIRTUAL COLUMN
    
    Analysis:
    ========
    Field name comparison happens while filling the virtual columns
    affected by foreign constraint. But field name is NULL in virtual
    index for the newly added virtual column.
    
    Fix:
    ===
    Ignore the index if it has newly added virtual column. Foreign
    key affected virtual column information is filled during
    loading operation.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 14895

commit 9ea3ac4d9408beb65af9aefe76e974181d0bef12
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Fri Dec 9 12:24:35 2016 +0000

    BUG#25209109 - NOT ALL TRACE MESSAGES ARE ENABLED IN GCS WITH -DWITH_TRACE_OUTPUT=1
    
    Description:
    -------------
    GR lost the ability to set on GCS the debug and trace flags,
    that are so much needed for developers.
    
    Suggested Fix:
    ---------------
    When of the unification of the CMake files, on mysql 5.7.17,
    the switches that allowed GCS debug and trace were not correctly
    implemented, thus causing trace and debug messages not to be
    displayed at all.
    
    This patch reintroduces those build switches and also corrects
    one file that has never been built with debug directives.
    
    - WITH_GCS_LOG_TRACE=1, will enable trace and debug messages
    - WITH_GCS_LOG_DEBUG=1, will enable debug messages
    
    This patch also removes the automatic feature that would
    enable debug messages on Debug builds on GCS.

commit 08cc347d2a01c45c0a7a7fe1354acdd246986a21
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Dec 14 08:33:51 2016 +0530

    Bug #25171608: REFERENCE TO ALIAS FROM SUBQUERY IN SELECT
                   LIST CAUSES INCORRECT BEHAVIOR
    
    Issue:
    ------
    In the following query:
    
    SELECT alias2
    FROM (SELECT ... alias1, (SELECT alias1 .... ) alias2
          FROM t1) X ;
    
    Notice that alias1 is created in the select list as the
    first column and is then referred to in the second column:
    alias2.
    
    Optimizer marks all the columns that are required from a
    derived table depending on the select list. In this process
    it decides that alias1 is not required and the
    corresponding subquery can be removed. This creates a
    problem because alias2 still requires alias1.
    
    Solution:
    ---------
    While marking all the columns that are required from
    derived table make sure that any column, including those
    from the preceding part of the select list, are also
    marked.

commit d0bb4dd5143be9bd487b2b595787ff937a688db8
Merge: 2d185e9 878c345
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Tue Dec 13 21:32:18 2016 +0000

    Merge branch 'mysql-5.6' into mysql-5.7

commit 878c34575033b65bd408b405fe75ae74207601db
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Dec 12 11:16:42 2016 +0000

    BUG#22904496: TEST FAILURE DUE TO STOPPED SLAVE COORDINATOR AND WORKER
                  THREADS
    
    Problem
    -------
    
    The rpl_parallel_switch_sequential test case is sporadically failing
    because of an unexpected error message in the slave server error log
    generated by the MTS slave applier.
    
    Analysis
    --------
    
    The test case has some non-deterministic activity that can
    enable/disable MTS, generate some workload on the master and stop/start
    the slave threads.
    
    As the test case is not doing any synchronization with the master before
    issuing STOP SLAVE, there is a chance that the slave applier be in MTS
    mode and in a condition that it will throw the reported error message.
    
    Fix
    ---
    
    Just uncommented a suppression for the error message that was already
    present on the test case.

commit 2d185e98ff3f6f30c82e2559e3955171f533311e
Merge: 9b63567 8540aa8
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Dec 13 16:43:42 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 8540aa850ecffffcafa56d579b8f94454d249ff7
Merge: 705e700 3a16634
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Dec 13 16:42:22 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 3a166341d0ba804fdb7c4aeb222836e41b818d0f
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Dec 13 16:41:05 2016 +0530

    Bug #24595937: INCORRECT BEHAVIOR WHEN LOADING DATA TO VIEW
    
    Issue:
    ------
    While using the LOAD statement to insert data into an
    updateable view, the check to verify whether a column
    is actually updatable is missing.
    
    Solution for 5.5 and 5.6:
    -------------------------
    For a view whose column-list in specified in the LOAD
    command, this check is not performed. This fix adds the
    check.
    
    This is a partial backport of Bug#21097485.
    
    Solution for 5.7 and trunk:
    ---------------------------
    For a view whose column-list is specified in the LOAD
    command, this check is already performed. This fix adds the
    same check when no column-list is specified.

commit 9b6356708fb366641d9273ac7a005d820937dab2
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Tue Dec 13 09:22:11 2016 +0100

    Bug #23748432 MYSQLPUMP FULL LOGICAL BACKUPS UNUSABLE WITH GTID REPLICATION
    
    Post push fix. On solaris set-gtid-purged default value is not getting set
    which is causing rpl_pump test to fail. This patch fixes the issue by
    explicitly setting default value for --set-gtid-purged option.

commit a40f4e8e74aa6a2c4e09079d0116911a1d187e34
Merge: a46509a a9df0fd
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Dec 12 22:49:47 2016 +0530

    Merge branch 'mysql-5.7.17-release' into mysql-5.7

commit a46509ab01ef90e467d7048f39aa38915145a2d5
Merge: a0eb31b 705e700
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Dec 12 18:48:32 2016 +0530

    Upmerge of the 5.6.35 build

commit 705e7005d6448c7fb1026a41dab1e7be4910ab13
Merge: 6ce0c0b 1920b22
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Dec 12 18:42:41 2016 +0530

    Merge branch 'mysql-5.6.35-release' into mysql-5.6

commit a0eb31bd117bd73d586aa11c556b6514555838ff
Merge: 6b68e35 6ce0c0b
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Dec 12 17:09:07 2016 +0530

    Upmerge of the 5.5.54 build

commit 6ce0c0b0b1af14d1f69f3b77966c9a71d03202d0
Merge: c947f38 db6ac93
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Dec 12 17:05:48 2016 +0530

    Upmerge of the  build

commit db6ac930767ef0fbfc4185039cdabc4bb278a24a
Merge: fcc5d8e 6b3b64d
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Dec 12 16:51:06 2016 +0530

    Merge branch 'mysql-5.5.54-release' into mysql-5.5

commit 6b68e3500f40b29c3ea260c1ce84679af25df018
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Tue Dec 6 11:46:38 2016 +0000

        BUG#25202999 - MEMORY LEAK/ASAN FAILURE AFTER BUG#25134074
    
        Description:
        -----------
        After BUG#25134074, one introduced a leak on the code, since one returns
        directly from XCom callbacks in case of VOID_NODE_NO, but one needs to make
        some cleanup before effectively returning the control to XCom.
    
        Analysis and Suggested Fix:
        ---------------------------
        After detecting, in and XCom callback, that we are returning after detecting
        that our own node_no is VOID_NODE_NO, make all appropriate cleanup

commit f3aeed2633b29e1959861107ad54370888502ce7
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Dec 9 12:00:28 2016 +0100

    Bug #23748432 MYSQLPUMP FULL LOGICAL BACKUPS UNUSABLE WITH GTID REPLICATION
    In order to restore logical backups to a GTID enabled MySQL instance,
    mysqlpump must do two things to ensure that the GTID metadata on the new
    instance matches that of the original when the backup was taken
    1. Disable binary logging.
    2. Set @@GLOBAL.GTID_PURGED=@@GLOBAL.GTID_EXECUTED
    
    Prior to this patch mysqlpump was not performing the above 2 steps. Now this
    patch fixes the same.

commit 30b0ffb3c291433a76a028e4acafc7d187dca9cb
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Dec 9 15:35:07 2016 +0530

    Bug #24810564: INCORRECT BEHAVIOR OF UPDATE TABLE IN A
                   STORED PROCEDURE
    
    Issue:
    ======
    This problem occurs under the following conditions:
    1) Multi-table update statement with a derived table that
       will be optimized away.
    2) The update statement is part of a procedure and has a
       specific DEFINER.
    3) More than one call of the procedure.
    
    Before checking privileges on a table, the user is granted
    select authorization on derived tables. When the procedure
    is called for the first time, this is done during the
    prepare phase by the optimizer while resolving the derived
    table (see TABLE_LIST::resolve_derived). In this case that
    derived table is merged into the outer query by the
    optimizer.
    
    On the second execution, multi-table update doesn't
    distinguish between derived tables and regular tables and
    unsets the required grant privileges already assigned to
    the derived table's object. This happens when a merged
    derived table is part of a materialized derived table.
    Optimizer ignores the derived table object since it has
    been merged into the outer query. This will result in
    incorrect behavior when checking for permissions on the
    derived table.
    
    Solution:
    =========
    For multi-table update, the precheck phase doesn't
    distinguish between regular tables and derived tables that
    are part of the subqueries.
    
    The fix is to make sure that derived tables are handled
    differently. While setting permissions, currently
    next_local is used to traverse the table list. This results
    in skipping for some derived tables. This has now been
    changed next_global. And due to this, it is also not
    neccessary to handle the subqueries in the table list
    separately.
    
    Similar problem exists in the precheck code of CREATE VIEW.
    This has also been modified on 8.0.

commit ffc8be42498bded67d219c42ecda269d8a40b2b3
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Dec 7 11:10:49 2016 +0100

    BUG#22322685 ERROR LOG DEFINED PATH MIS-ALIGNS WITH LOGROTATE.D CONFIG IN RPM INSTALL
    
    Use cmake variables to align paths.

commit 9ca93e090378514070eb93fc6055641a608e2884
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Fri Dec 9 12:12:28 2016 +0530

    Bug#21326745: ASSERTION FAILURE IN TEST RPL_GTID.RPL_SYNC_RELAY_LOG_INFO
    
     There are two types of assertion failures in test.
      1)In the test some operation is performed on master and
     on slave assertion is made whether the master_log_name
     and master_log_pos have got updated in mysql.slave_relay_log_info.
     The assertion is failng with the result that the master_log_file
     and position have not got synced since before the assertion is
     made the test doesn't guarantee whether the slave has synced it's
     IO_THREAD with the master.
    
      2) some times there is assertion failure in gtid_step_assert.inc.
     This file checks that n number of gtid's have been added since
     last call to gtid_executed was made. This assertion is failing
     since before the assertion is made the test doesn't guaratee
     whether the slave's IO_THREAD is in sync with the master.
    
     Fix: Replaced assert.inc with wait_condition.inc.
         Added sync_slave_io_with_master wherever necessary.

commit 7ad9ce68945f16689abac2d3a0a5e93d0b3b3f5b
Merge: 70783c1 c947f38
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Dec 7 07:22:00 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c947f381f36d4e542934da7ab0f808b0e8b38d26
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Dec 7 07:20:44 2016 +0530

    Bug #25095582: OPT_TRACE.BUGS_NO_PROT_ALL FAILS ON PB2 WITH
                   RESULT CONTENT MISMATCH
    
    Adding analyze table to the tests added as part of
    Bug #23227428 and Bug #23259872.
    
    For Bug #23227428, there is no need for a full trace
    output. We are looking for a specific string to make sure
    that the range optimizer is re-run with the new index.
    
    This is to avoid the sporadic failures seen on pb2.

commit 70783c13ecb34bfbabfa3f10836c95181cfaf9d3
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Fri Dec 2 10:38:22 2016 +0000

    BUG#20551133: SPORADIC FAILURES IN RPL_GTID_LOGS_WITHOUT_ROTATE_OR_STOP_EVENT
    
    Problem
    -------
    
    The test case is sporadically reporting a unexpected warning found on
    the slave error log:
       Request to stop slave SQL Thread received while applying a group
       that has non-transactional changes; waiting for completion of the
       group ...
    
    Analysis
    --------
    
    The test case added a suppression on the master that is replicated to
    the slave before a call to "STOP SLAVE".
    
    As there is no slave synchronization with the master before the stop
    slave request, the slave applier can be still applying the transaction
    with the suppression message, that uses non-transactional storage
    engine. In this case, the unexpected warning message will be logged in
    the slave error log.
    
    Fix
    ---
    
    The suppression is only needed on the slave side. Making the suppression
    to only be applied on the slave should avoid the behavior reported on
    the analysis section.

commit 2b34d1d20b5b90aee3af11d0467c689734ff9b20
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Tue Dec 6 09:05:26 2016 +0100

    Bug#24493829 SETTING THE NULL_AUDIT_EVENT_RECORD CAUSES SEGMENTATION FAULT
    
    Post-push fix. Memory leak fixed (reported by Valgrind).

commit 86ad2686cf0ec91355d15c3cf589ae472861c5a3
Merge: 95caacd de9350b
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Dec 6 09:07:44 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit de9350b1236d5ff9b18b16179fc3b588bc15351b
Merge: c6f02fe fcc5d8e
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Dec 6 09:06:47 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit fcc5d8ed6fddf3edb594d0f2ea2429fbd9b644b0
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue Dec 6 08:35:26 2016 +0100

    BUG#13788154 INIT.D MYSQL SCRIPT CREATED BY MYSQL SOLARIS PACKAGE FAILS TO RUN DUE TO USE OF PIDOF
    
    pidof is Linuxism, prefer pgrep on other UNIX systems.

commit 95caacdd97f2ced11edb36ca702bbf6b27fb1614
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Mon Dec 5 17:56:04 2016 +0100

    Bug#22574695 ASSERTION `!TABLE || (!TABLE->READ_SET || BITMAP_IS_SET(TABLE->READ_SET, FIELD_I
    
    Back-port from trunk.

commit 960b761e4a4e3a7e507c08bea3206ee4fe46e291
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Nov 30 12:19:21 2016 +0100

    BUG#24964923: SPORADIC GR LOCAL PORT BIND FAILURES ON WINDOWS
    
    After extensive investigation and discussion, we concluded that the
    bind failures on Windows are expected due to two reasons:
    a) Group Replication does use SO_EXCLUSIVEADDRUSE on its sockets
       on Windows. This disallows that a second application can
       eavesdrop on a socket of another application.
       This option on some situations requires that a given time delta
       elapses between socket close, socket reopen. Exactly what we are
       seeing on PB2 and Hudson.
       https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx
    b) On Group Replication we have both client and server sockets, due
       to the event driven of our group communication library, we do
       not control the socket close order.
       When the server socket closes after the client socket, we jump
       into one of the situations on which SO_EXCLUSIVEADDRUSE option
       does require a given time delta between socket close and reopen.
    
    To minimize this behaviour, we did try several approaches, despite
    all had reduced the number if bind failures, none did make the
    number shrink to 0.
    Which leaves us with only one ultimate solution: make MTR deal
    with bind failures in a graceful fashion.
    The approach is:
      After START GROUP_REPLICATION, we check if the command did
      fail due to a bind failure, if it did:
        on Windows systems: the test will skip itself;
        on other systems:   the test will fail.

commit 140be259453145826fd0a3e1d29c0ab6e4c9458f
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Nov 25 20:03:07 2016 +0100

    Bug #25202079: Removal of unused code from X Plugin
    
    - removal functionality of register_server_state_observer,
      unregister_server_state_observer
    - minor refactoring around to_string functionality
    
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 14793

commit 43c0e21e3613554fb8f10dce432fc411433ca761
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Nov 30 17:17:22 2016 +0100

    BUG#25170698: GR+MTS: ER1755 CAN BE IMPROVED FOR MTS LC -> MTS DATABASE
    
    Group Replication only does support logical clock parallel applier.
    Despite that we may replicate to a external server from the group,
    and that external slave may be configured with database parallel
    applier.
    When this topology is in place, the external server would refuse to
    replicate the View_change_log_events from the group, since those do
    not include database context. Applier was, preemptively stopping
    instead of continuing and cause possible inconsistencies.
    Though View_change_log_events are NOP events when are outside of a
    group, they are just written to binary log, so we are safe to apply
    them and continue applying replication events.
    
    To avoid the database parallel applier stop when it handles a
    View_change_log_event, we mark this event type as IGNORABLE, which
    allows database parallel applier to execute it despite not having
    database context.
    Also, marking View_change_log_events and
    Transaction_context_log_event as IGNORABLE avoids:
     1) applier binary log decoding when reading 5.7+ binary/relay log
        files with 5.6 client tools;
     2) replication stop while replicating from a GR group to a 5.6
        server, directly or through a 5.7 slave between the group and
        the 5.6 server.

commit aa598191c630bfb20f4a95c0302893de99a853a1
Merge: 6784a0e c6f02fe
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Dec 5 16:02:12 2016 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit c6f02fe8cd7c037bc7d7e3f49c7f575cf78a095d
Merge: ac4b7e5 a85a63b
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Dec 5 15:58:55 2016 +0200

    Merge branch 'mysql-5.5' into mysql-5.6

commit a85a63be7ec2be986aafdd7fdbe3a96e0afe52cd
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Dec 5 15:36:23 2016 +0200

    Bug #25111907: XML TEST FAILS WITH UNDEFINED BEHAVIOR
    
    The XML parser position stack for each level is with a fixed depth.
    So a bounds check was done to ensure that this depth is not exceeded.
    But it was off by one (i.e. the size of the array was a valid index).
    Fixed by decreasing the allowable depth by one to match the maximum
    number of elements in the position stack.

commit 6784a0e47472155eb5b811d5f359bd311dceb4e5
Merge: 5ab78ff ac4b7e5
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Dec 5 14:43:54 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit ac4b7e58c49ec13fec23c1cec0448772aad25d3c
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Dec 5 14:42:47 2016 +0530

    Bug #25147515	SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED
    
    PROBLEM
    -------
    User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5
    and with binlog on. Since "get" is a read transaction this connection is not
    allocated any conn_data->thd (which is used for bin log commit).The connection
    is kept open. Innodb background thread tries to commit transactions which have
    exceed CONN_IDLE_TIME_TO_BK_COMMIT and whose read batch size > 0, when it finds
    this connection it tries to attach conn_data->thd to bin log thread.Since
    conn_data->thd is NULL it crashes.
    
    FIX
    ---
    Check conn_data->thd value before attaching it to binlog thread.

commit 5ab78ffbdf3d8ae8cea3e3037b09a0d2d9d8a075
Merge: 1bd08bf e642fc1
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Dec 5 09:45:11 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit e642fc14834bb4daa65fb36dee66efb6c58a9a41
Merge: bcd02cb 53fc942
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Mon Dec 5 09:24:18 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 53fc942d602659419e73dc59ecd37cefd50a6bff
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Fri Dec 2 13:33:44 2016 +0100

    Bug#22240513 REMOVE GITIGNORE / BZRIGNORE FROM OFFICIAL RELEASE
    
    Add .gitattributes to let git archive ignore .gitignore.

commit 1bd08bf9d6c6ab75dfbff8ce957cbda5edac1996
Merge: 3ffe32e bcd02cb
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Dec 5 10:19:40 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit bcd02cbd1b3135b8a50d25996d83bf974d2cbcea
Merge: 6ff7d00 ad1b361
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Dec 5 10:19:09 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit ad1b3617259dc325ef843740feda1a6bfcafeb45
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Dec 5 10:17:40 2016 +0530

    BUG#25147154 : MTR TRIES TO COPY CONTENTS FROM /TMP/DATA
    
    Description :
    =============
    When a MTR test run is started, it initializes the server and creates
    the datadir under '$MYSQL_TEST_DIR/var'('/tmp/var' or '/dev/shm/var'
    if --mem option is used) location and then copies it to the datadir
    location of server(s).
    
    If $parallel == 1, datadir location of the server is
    '$MYSQL_TEST_DIR/var/data'. If $parallel > 1, datadir location of any
    server is '$MYSQL_TEST_DIR/var/<thread_num>/data'.
    
    This is the reason MTR searches for the initialized datadir in 2
    locations('$opt_vardir' and '$opt_vardir/..') from the current vardir
    location..
    
    But this can cause few problems. If a directory with the name 'data'
    already exists under '$MYSQL_TEST_DIR' and if the MTR run is started
    with parallel value 1, then
    
    1. copytree($install_db, '$opt_vardir/..') command will fail if the
    user doesn't have the access permission to '$MYSQL_TEST_DIR/data'
    directory.
    2. Unnecessary contents from '$MYSQL_TEST_DIR/data' directory will be
    copied to server datadir location and this might affect the server
    startup.
    
    Fix :
    =====
    Depending on the $parallel value decide whether the path for the
    initialize datadir is "$opt_vardir"(i.e $parallel = 1) or
    "$opt_vardir/.."(i.e $parallel > 1).
    
    Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com>
    Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com>
    RB: 14773

commit 3ffe32e0817fea7b6337966094d85fec9b891a4c
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Mon Dec 5 09:24:19 2016 +0530

    BUG#25126722
    post push fix: disable embedded mode for innodb.foreign_key

commit 324eb2cf7e8bc3cefe6569c3282996d400aa6bb4
Merge: 69b5779 6ff7d00
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sun Dec 4 18:47:33 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 6ff7d00c4c18c63a9ef0eab086a56604cdf1aef0
Merge: de739c7 e902b24
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sun Dec 4 18:46:49 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit e902b2400da17f4646b019bf79066e331c5b1581
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sun Dec 4 18:44:51 2016 +0530

    Bug#24449090 - BUFFER OVERFLOW IN FUNCTION DUPL
    
    Post-push fix for memory leak in the code inside
    DBUG_EXECUTE_IF("bug24449090_simulate_oom",...);

commit 69b5779acee7dade1a43c7e5f723b64f88697128
Author: Vikram G <vikram.gg@oracle.com>
Date:   Mon Nov 28 11:07:45 2016 +0530

    Bug #24391859 ADD MTR TEST TO CHECK BASIC DML OPERATIONS ON GR USING X PROTOCOL
    
    This test checks the basic functionality of group replication plugin along
     with mysqlx plugin (x mode).

commit 74bf765772b307d5ddc93b0184e415a125875fa5
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Fri Nov 25 16:25:44 2016 +0000

    BUG#25134074 - JET/JAG CRASHES WITH MYSQL-GCS
    
    Description:
    -----------
    From BUG#25098458, during GCS JET tests, one discovered a regression on GCS
    caused by a refactoring, which was not discarding messages when the member
    was not active within the group.
    
    How To Repeat:
    -------------
    Please refer to bug#25098458
    
    Suggested Fix:
    -------------
    Add the check if we are a VOID_NODE_NO when receiving a message.

commit 9a1055e4fd102ada2843d29b4b2065800573b186
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Dec 2 10:36:40 2016 +0100

    Bug#24689101	ADD -DWITH_NUMA=ON FOR DEBS WHERE POSSIBLE
    
    Flag added for all Debian/Ubuntu builds

commit e811bbd212b16e022d22dbe28be2e13d9e46f7f7
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Nov 29 10:06:30 2016 +0100

    Bug#22525354 MY-DEFAULT.CNF.SH IS WRONG AND OBSOLETE AND SHOULD BE REMOVED
    
    Approved-by Terje Rosten <terje.rosten@oracle.com>
    Approved-by Tor Didriksen <tor.didriksen@oracle.com>

commit 3a1b035aaa2a4dad058bc3f849e5ade00c6cac59
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Wed Nov 30 14:19:44 2016 +0100

    Bug#24493829 SETTING THE NULL_AUDIT_EVENT_RECORD CAUSES SEGMENTATION FAULT
    
    Problem:
    ========
    
    null_audit_event_record variable is not intended to be modified outside
    of the null_audit plugin. null_audit_event_record buffer must be allocated/deallocated
    from within a plugin.
    
    Fix:
    ====
    
    null_audit_event_record is read only variable.
    
    Reviewed-by:
    ============
    
    Arun Kuruvila <arun.kuruvila@oracle.com>
    Georgi Kodinov <georgi.kodinov@oracle.com>

commit 846de08638649ffcabacce4436f51b92182883e4
Merge: 1afd693 de739c7
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Wed Nov 30 18:28:52 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit de739c75b2153b2f09f0d8c4da0ad533fd32d9b0
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Wed Nov 30 18:26:54 2016 +0530

    Bug #22686994: REGRESSION FOR A GROUPING QUERY WITH DISTINCT
    
    ISSUE: Using aggregate function with distinct, results in
           wrong results. This happens because, while handling
           the final distinct, write_func gets set to
           end_write_group instead of end_write.
    
    FIX: In JOIN::make_tmp_tables_info() unset sort_and_group
         while creating group table.

commit 1afd693b6d7e7d0b65322d22ca8253c02e565a1b
Merge: ea0a8b8 529fe6d
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Nov 30 09:46:34 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 529fe6d519f9fbfac177e01fa433361b64fcf5c1
Author: Daniel Horecki <daniel.horecki@oracle.com>
Date:   Mon Oct 3 10:25:11 2016 +0200

    Don't install systemd file if there is no systemd by default.

commit ea0a8b8883751ec26872b585ffa7b32d282f3b46
Merge: b1c803d 22499bd
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Nov 30 12:54:20 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 22499bd6c0b8d2f8a6057a911b1adcb5d61dd573
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Nov 30 12:51:32 2016 +0530

    Bug #14025581 FILE IO INSTRUMENTATION DISABLED IN PERFORMANCE SCHEMA FOR INNODB
    
    PROBLEM
    =======
    Since windows use HANDLE for file descriptor and pfs needs to register
    the file with a integer key for instrumentation , the performance schema
    for file IO is currently disabled on windows.
    Fix are for 5.6+.
    Solution
    ========
    Define a common descriptor like how we have os_file_t for
    platforms other than windows i.e os_pfs_file_t as
    struct os_pfs_file_t  {
           os_file_t m_file;
    #ifdef UNIV_PFS_IO
           struct PSI_file*     m_psi;
    #endif
       };
    
    Reviewed-by: Jimmy Yang <Jimmy.Yang@oracle.com>
    Reviewed-by: Marc  Allf <marc.alff@oracle.com>
    RB: 14714
    RB: 14539
    RB: 14702

commit b1c803dbaebb4a22011293f74b531c4e1e9bf878
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Sat Nov 26 19:47:15 2016 -0600

    Bug#24336345 MEMORY LEAK IN UNIT TESTS
    
    Cleanup instrument classes after each Performance Schema unit test to avoid
    memory leaks. Make PFS_global_param param global to eliminate stack overflow
    ASAN false positive.

commit e0e94614e08e1b3340436bb1be3a3eb15e68849c
Merge: c7c075b bca27b2
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Wed Nov 30 01:28:20 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit c7c075b37b3cd6e3557097f639291101ee49143d
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Wed Nov 30 00:43:52 2016 +0100

    Bug#23522793 GIGO: AUDIT_LOG_FILTER_REMOVE_FILTER CRASHES WITH NULL STRING
    
    Problem:
    ========
    UDF consists of two functions: init and the implementation itself. Audit log
    UDFs perform argument check in the UDF init. In some cases that is not enough,
    especially when the parameter is evaluated by a function.
    
    Fix:
    ====
    Perform argument check in init and the UDF implementation as well.
    
    Reviewed-by:
    ============
    Arun Kuruvila <arun.kuruvila@oracle.com>
    Robert Golebiowski <robert.golebiowski@oracle.com>

commit bca27b23e67b6d4a4d9364e9245ff677c6185e89
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Tue Nov 29 17:39:46 2016 -0600

    BUG#24336345 MEMORY LEAKS IN UNIT TESTS
    
    Cleanup instrument classes after each Performance Schema unit test to avoid
    memory leaks. Make PFS_global_param param global to eliminate stack overflow
    ASAN false positive.

commit 7e4cef426e3bd98e097bc02f20cb310a4c6bc6c7
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Nov 29 16:07:43 2016 +0530

    Bug #23295423: HANDLE_FATAL_SIGNAL (SIG=11) IN
                   HANDLE_GRANT_TABLE
    
    Post push patch to fix test case failure in pb2.

commit cca5dbecbc2959e16d0d73780f5c74b19c4529ff
Merge: 4b536ec ba80d62
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Nov 29 15:32:25 2016 +0530

    Bug #23481444   OPTIMISER CALL ROW_SEARCH_MVCC() AND
                    READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
    
    Null merge branch 'mysql-5.6' into mysql-5.7

commit ba80d62381d5666bd64147ccd1a31ed0e4d4c6d0
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Nov 29 15:31:10 2016 +0530

    Bug #23481444	OPTIMISER CALL ROW_SEARCH_MVCC() AND READ THE
                           INDEX APPLIED BY UNCOMMITTED ROW
    Problem:
    ========
    row_search_for_mysql() does whole table traversal for range query
    even though the end range is passed. Whole table traversal happens
    when the record is not with in transaction read view.
    
    Solution:
    =========
    
    Convert the innodb last record of page to mysql format and compare
    with end range if the traversal of row_search_mvcc() exceeds 100,
    no ICP involved. If it is out of range then InnoDB can avoid the
    whole table traversal. Need to refactor the code little bit to
    make it compile.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
    Reviewed-by: Knut Hatlen <knut.hatlen@oracle.com>
    Reviewed-by: Dmitry Shulga <dmitry.shulga@oracle.com>
    RB: 14660

commit 4b536ece5dea51fa7d0bf98518de0691ec3322dc
Merge: 579d79b 4cb3028
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Nov 29 12:47:03 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 4cb3028c76dbf186dcae0bdef91c772687b34df1
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Nov 29 12:42:59 2016 +0530

    Bug#20228478 - ON REPLICATION SLAVE ALTER USER FAILING FOR
                   USER WITH SHA256_PASSWORD PLUGIN
    
    Post push fix to address the test script failure.

commit 579d79b167bc6840026aa0fe768fe810aa2b5ae9
Merge: 2e152e1 6dcfc56
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:28:51 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    Conflicts:
    	regex/regcomp.c

commit 6dcfc56d4c5d82e849485a7910872232b98b5fa6
Merge: e8eab7c 536593f
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:27:50 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 536593fc1cb1d86889c4b28c423e6dc75d9cd285
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:26:25 2016 +0530

    Bug#24449076 - INTEGER OVERFLOW IN FUNCTION DOINSERT
    
    DESCRIPTION
    ===========
    Performing a pattern match of a Regex resulting into a very
    large string, leads to crash due to integer wraparound.
    
    ANALYSIS
    ========
    doinsert() - The length calculated here (to copy the
    number of bytes) comes out to be too large to be stored in
    the "int" variable 'length'. We need to ensure that the
    variable can accommodate large lengths.
    
    FIX
    ===
    'length' in doinsert() is now defined as of type "size_t"
    instead of "int"

commit 2e152e1b878464a8ae2d08167e1eced8a1c5a46b
Merge: 655b5a2 e8eab7c
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:21:49 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit e8eab7c81d46255d63436bfbe7f90a68da943407
Merge: d66d9a6 4f54b00
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:21:02 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 4f54b0004c383f3997a4ab697eec5e5793cd4877
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 29 11:19:30 2016 +0530

    Bug#24449090 - BUFFER OVERFLOW IN FUNCTION DUPL
    
    DESCRIPTION
    ===========
    Performing a pattern match of a Regex resulting into a very
    large string, leads to crash due to failed realloc().
    
    ANALYSIS
    ========
    dupl() calls enlarge(). It in turn calls realloc() for
    pointer p->strip. This eventually fails due to OOM.
    However we are still using the same pointer in memcpy()
    causing a SEGFAULT!
    
    FIX
    ===
    1) In dupl(), checking for error code (which would be set
    if realloc fails) immediately after call to enlarge().
    Returning now with this error code.
    
    2) Handling the same in the caller functions.

commit 655b5a2916e4ac613e516964f1214876ccfa3946
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Nov 23 13:57:59 2016 +0100

    BUG#25162590 - X PLUGIN TRIES TO DEFINE MYSQL_DYNAMIC_PLUGIN BUT IT IS NOT NEEDED
    
    Description
    ===========
    X Plugin tries to redefine "MYSQL_DYNAMIC_PLUGIN" in the source code
    which isn't needed (cmake already does that).
    
    Reviewed by Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    RB: 14732

commit 158e438f4177f41ab550351727523da85597a4f0
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Nov 23 12:40:02 2016 +0100

    BUG#25047909 'MYSQLX-BIND-ADDRESS' DEFAULT MUST BE '*'
    
    Description
    ===========
    WL#9266 defined default value for system variable "mysqlx-bind-address"
    to be backward compatible with previous releases of X Plugin, still
    more important is to be in align with MySQL Servers "bind-address"
    system variable which is set to "*".
    
    Fix
    ===
    Default value of the system variable was changed to "*".
    
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    RB: 14690

commit 1b0e13250c40b0b8de2a294f463d8e1e2fa31884
Author: Robert Golebiowski <robert.golebiowski@oracle.com>
Date:   Mon Nov 28 16:12:41 2016 +0100

    Bug #25048274: SOME FILES HAVE GPL LICENSE HEADER
    
    Description:
    Some files have GPL license header.
    
    Fix:
    Remove GPL license header where necessary

commit 586bc332a4129fd1671f2686c8db8a0b86211d35
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Nov 23 12:20:17 2016 +0100

    BUG#24940144 EXPECT.OPEN BEFORE AUTH LEADS TO READ FROM BAD FILEDESCR
    
    Description
    ===========
    X Plugin tries to read from already closed socket, which leads to
    "recv" call with socket value set to "-1".
    
    Analyzis and fix
    ================
    The issue was caused by wrong state of "xpl::Client" object which was
    not modified in call to "xpl::Client::shutdown_connection" and was causing
    additional message-loop iteration in "xpl::Clinet::run" until EBADF
    was received.
    
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    RB: 14689

commit 1920b22f480ad50b125d77d42971a878e7ca4ea5
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 28 16:43:06 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit d66d9a678b1b11ce940b2afb624621286af98ab8)

commit 6b3b64da66644ba5c142f2f289fbe4c8fb12e965
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 28 16:38:03 2016 +0530

    Bug#25159791 BASEDIR: COMMAND NOT FOUND ERROR WHILE STARTING SERVER WITH INIT SCRIPTS
    
    (cherry picked from commit 7a39efab8a59ebdcd562fb788bc004ff338796ea)

commit a7abe5454a5c674b00d6894a42c56c62ac495ac3
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Nov 28 09:59:44 2016 +0000

    BUG#24643036 BINLOG_SENDER DOES NOT REDUCE SIZE OF SEND BUFFER AS
                 EXPECTED
    
    Post push fix.
    
    The String object used as network packet by the Binlog sender is not a
    real string (it is not always a null terminated string).
    
    The code BUG#24643036 originally pushed did some optimizations in the
    packet memory allocation and handling that lead to situations were the
    String object buffer didn't filled the last buffer position with a '\0'.
    
    Because of this, some functions handling the buffer as a null terminated
    string (packet->c_ptr()) started failing on valgrind tests.
    
    This patch make those functions to pass the pointer to the buffer
    without considering it a null terminated string (packet->ptr()).

commit 009d62b68f3bf0ba8afc5e7bb39fb61caf8022f4
Merge: 6a93a17 d66d9a6
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 28 16:48:20 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit d66d9a678b1b11ce940b2afb624621286af98ab8
Merge: 64003a9 7a39efa
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 28 16:43:06 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 7a39efab8a59ebdcd562fb788bc004ff338796ea
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 28 16:38:03 2016 +0530

    Bug#25159791 BASEDIR: COMMAND NOT FOUND ERROR WHILE STARTING SERVER WITH INIT SCRIPTS

commit 6a93a173541a0b3e05db6a74b3cdecfa91973d5f
Merge: 52a4836 64003a9
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Nov 28 10:02:47 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 64003a9b55cb330982128782df73dc48d2e66e14
Merge: 5cfbdc6 c002314
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Nov 28 10:02:09 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 52a483683691289096b86e5139b86a090030b796
Merge: 58a525e 5cfbdc6
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Mon Nov 28 14:22:03 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 5cfbdc6932f8f3a49f9fe65575d5014287dfb70f
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Mon Nov 28 14:19:16 2016 +0530

    Bug#20228478 - ON REPLICATION SLAVE ALTER USER FAILING FOR
    	       USER WITH SHA256_PASSWORD PLUGIN
    
    Description:
    In a replication environment, SET PASSWORD/ALTER USER query
    fails to execute on the slave due to slave not being
    able to parse the hash string correctly.
    
    Analysis:
    When the plain text password is converted to hash and if
    the hash string contains a single quote, it results in a
    syntax error on the slave thread. This is because the hash
    string with quote is written to the binlog without
    correctly escaping the special characters. This results in
    the slave throwing a syntax error.
    
    Fix:
    The fix makes sure that depending on the charset and the
    sql-mode of the connection, the hashed password string is
    correctly escaped before it gets written to the binlog as
    a part of the query. The slave can then correctly parse the
    string and can execute the query successfully.

commit c0023143bd1d1d7b7ca69a13f35d9549373e2762
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Nov 25 11:03:44 2016 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
    PRIVILEGES
    
    Post-push fix: Handle symlink setting correctly.

commit 58a525e7230cdb4fc8d67bff800ba71966bb4df4
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Thu Sep 1 20:50:49 2016 +0400

    WL#7247: Deprecate and remove the \N synonym of NULL
    
    Note: this patch for 5.7, it introduces a deprecation warning for the \N extension.

commit 225338a0fdb96c8aec9698b3b2fc9f0064a8a41d
Merge: 018c3e8 6e2d369
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Nov 28 12:00:33 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 6e2d369db588968e5c79e490af002fd9e88dfd12
Merge: fe014f0 0f26ee3
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Nov 28 11:58:29 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 0f26ee33bf3dfb0ee70a3e1ff3361a3e15c1fb80
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Nov 28 11:55:36 2016 +0530

    Bug #23295423: HANDLE_FATAL_SIGNAL (SIG=11) IN
                   HANDLE_GRANT_TABLE
    
    Description:- Server received SIG11 in the function,
    "handle_grant_table()".
    
    Analysis:- TEMPORARY table can be created even when a
    non-TEMPORARY table of the same name is present and the
    existing non-TEMPORARY table is hidden until the temporary
    table is dropped. This behaviour is causing the server
    to crash when "user" and "host" fields of temporary
    mysql.user table are fetched as part of CREATE/DROP user.
    This issue exists with ACL system tables.
    
    Fix:- All functions updating ACL system tables are modified
    with a check whether the table to be updated has expected
    number of columns, expected character set and data type for
    each columns. If not, an error is thrown along with an error
    message reported in the mysqld error log.

commit b95762b07e758b17a7c82b8abc4a36a8a97b6829
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Sat Nov 26 20:41:48 2016 +0530

    Followup fix for Bug#25088048 - ADDITIONAL ISSUES IN MYSQLD_SAFE
      - Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file
    
    (cherry picked from commit 35c1adc17c1a99b2c256d374500437a6ce21339e)

commit 018c3e8a7a1d7e6d501a952b04e9144495d2ffd5
Merge: 5de9c39 fe014f0
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Sat Nov 26 22:21:57 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit fe014f0ef178073008c44f02a012a5ed67e7b160
Merge: a1d5217 35c1adc
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Sat Nov 26 22:19:28 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 35c1adc17c1a99b2c256d374500437a6ce21339e
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Sat Nov 26 20:41:48 2016 +0530

    Followup fix for Bug#25088048 - ADDITIONAL ISSUES IN MYSQLD_SAFE
      - Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file

commit 5de9c39f397e6642f08bab49b438f04f0a6fc3c5
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Fri Nov 25 16:16:15 2016 +0530

    Bug #23481444   OPTIMISER CALL ROW_SEARCH_MVCC() AND
                    READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
    
    - Fixing the RQG failure by removing infimum check and
    adding the test case to test virtual column index.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>

commit d0b26ca8edccb6f965533d30c5eba479cf9b6239
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 21:55:42 2016 +0100

    Merge ../bug_25092566 into mysql-5.6
    
    (cherry picked from commit a1d52171de9b20130ef4b6de6e5e018ad16dbaf1)

commit dd55b22b015e19310319c70b8d200d78ee432c93
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 10:03:12 2016 +0100

    Merge ../bug_25092566 into mysql-5.6
    
    (cherry picked from commit 234bf1c47b2271c345847b2b3927bc6a78dabe3b)

commit 8b8f0d2550d4b6028b5633347051057e52b68ee7
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Nov 16 14:11:02 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit 00189280432ac459d657417f7ec42aed651d5ec0)

commit 1daf8794fe8812181b440823989f7d90e62db693
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 21:53:55 2016 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
    PRIVILEGES
    
    Post-push fix: Handle embedded server correctly.

commit 7509ca8506550f7caf9d2573503f6d58f57aec94
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 09:57:54 2016 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
    PRIVILEGES
    
    Require FILE privilege when creating tables using external data directory or
    index directory.

commit 2a9b2c913022f5b768725a806170e3f863ee9129
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Nov 16 13:41:27 2016 +0100

    Bug#25088048 ADDITIONAL ISSUES IN MYSQLD_SAFE
    
    Don't read --ledir option from config file.
    Ignore current working for finding location of mysqld
    Remove use of chown/chmod in scripts.
    Be helpful only when basedir is /var/log or /var/lib.
    Removed unused systemd files for SLES.
    Set explicit basedir in scripts.

commit dc55bc8de77539b846200c0baa2f2a5715779dd9
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Fri Nov 25 11:04:23 2016 +0530

    BUG#25126722 FOREIGN KEY CONSTRAINT NAME IS NULL IN INFORMATION_SCHEMA
                 AFTER RESTART
    
    Problem :
    ---------
    Information_Schema.referential_constraints (UNIQUE_CONSTRAINT_NAME)
    shows NULL for a foreign key constraint after restarting the server.
    If any dml or query (select/insert/update/delete) is done on
    referenced table, then the constraint name is correctly shown.
    
    Solution :
    ----------
    UNIQUE_CONSTRAINT_NAME column is the key name of the referenced table.
    In innodb, FK reference is stored as a list of columns in referenced
    table in INNODB_SYS_FOREIGN and INNODB_SYS_FOREIGN_COLS. The referenced
    column must have at least one index/key with the referenced column as
    prefix but the key name itself is not included in FK metadata. For this
    reason, the UNIQUE_CONSTRAINT_NAME is only filled up when the
    referenced table is actually loaded in innodb dictionary cache.
    
    The information_schema view calls handler::get_foreign_key_list() on
    foreign key table to read the FK metadata. The UNIQUE_CONSTRAINT_NAME
    information shows NULL based on whether the referenced table is
    already loaded or not.
    
    One way to fix this issue is to load the referenced table while reading
    the FK metadata information, if needed.
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
    
    RB: 14654

commit c07e5128a98edb3ea15eb5b7e05613add587ed14
Merge: fda0352 a1d5217
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 21:59:08 2016 +0100

    Merge ../bug_25092566__5.6 into mysql-5.7

commit a1d52171de9b20130ef4b6de6e5e018ad16dbaf1
Merge: 234bf1c c20be85
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 21:55:42 2016 +0100

    Merge ../bug_25092566 into mysql-5.6

commit c20be85c65210237139aa1d93337bfc2b049e1b6
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 21:53:55 2016 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
    PRIVILEGES
    
    Post-push fix: Handle embedded server correctly.

commit fda03524ec0e601b933189a53bea2c28c6deda4e
Merge: 315db47 234bf1c
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 18:25:27 2016 +0100

    Merge ../bug_25092566__5.6 into mysql-5.7
    
    Conflicts:
    	mysql-test/suite/parts/r/partition-dml-1-11-innodb.result
    	mysql-test/suite/parts/r/partition-dml-1-11-myisam.result
    	sql/partition_info.cc
    	sql/partition_info.h
    	sql/sql_parse.cc

commit 315db476c68a804f1cec0d5a1bb77c80771192c8
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Wed Nov 16 16:01:54 2016 +0000

    Bug#25119288: COMPILATION WARNINGS WITH GROUP REPLICATION PLUGIN ON WINDOWS ON 5.7
    
    There are some warnings when building Group Replication on Windows on 5.7.
    These warnings need to be analysed and fix all possible ones.
    
    Warnings were due the need of casts to convert variables types.

commit d3a552650afd3b57a9dcea60cfadc53c7111a854
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Mon Oct 3 10:12:08 2016 +0200

    Bug#24756780 SOME FILES HAVE WRONG PERMS
    
    Approved by Terje Rosten <terje.rosten@oracle.com> over IM.
    
    Backport this from mysql-trunk.

commit 3160ccf71a0b6fd1d5d87d4ce63c9477f5626e44
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Nov 24 14:43:45 2016 +0100

    BUG#24818604: MYSQLD CRASHES WHILE STARTING GROUP REPLICATION FOR A NODE IN RECOVERY PROCESS
    
    During BUG#24818604: MYSQLD CRASHES WHILE STARTING GROUP REPLICATION
    FOR A NODE IN RECOVERY PROCESS analysis, three issues were found:
     1) Foreign keys were not being ignored when foreign_key_checks == 0
        That was fixed on BUG#24916351: GR KEY GENERATION FOR FOREIGN
        KEY SHOULD BE IGNORED IF PARENT IS NOT YET CREATED
     2) Foreign keys referenced_key_name could be NULL when a DELETE on
        a child table was executed before accessing the parent, like
        just after server start.
        That was fixed on BUG#25126722 FOREIGN KEY CONSTRAINT NAME IS
        NULL IN INFORMATION_SCHEMA AFTER RESTART
     3) A DELETE on child table after the parent table was dropped using
        foreign_key_checks= 0, is making referenced_key_name NULL and
        consequently crashing the server.
    
    This patch solves issue 3), by skipping foreign keys inclusion on
    transaction write set if referenced_key_name is NULL, since this,
    after issue 1) and 2) fix, means that the parent table does not
    exist and there is no foreign key constraint.

commit 8e68d98915904e8865db2da0908261cfd249310a
Author: Vikram G <vikram.gg@oracle.com>
Date:   Wed Nov 23 18:30:52 2016 +0530

    Follow up for commit 1c56209120238f533c7a5cb6d9046b4d7ad4e7c1
    
    Fixed failures of below tests on windows:-
    
    group_replication.gr_basic_crud_on_doc
    group_replication.gr_xplugin_global_variables
    group_replication.gr_xplugin_basic_dml

commit 234bf1c47b2271c345847b2b3927bc6a78dabe3b
Merge: edb3c3a 43a039d
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 10:03:12 2016 +0100

    Merge ../bug_25092566 into mysql-5.6

commit 43a039dadf326c5d77ceba8b4e21bf290e1045ba
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 24 09:57:54 2016 +0100

    Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
    PRIVILEGES
    
    Require FILE privilege when creating tables using external data directory or
    index directory.

commit df75cd16debaffaf34423bf83e56321ec7296c75
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Mon Sep 12 17:27:06 2016 +0100

    BUG#24643036 BINLOG_SENDER DOES NOT REDUCE SIZE OF SEND BUFFER AS
                 EXPECTED
    
    Background
    ----------
    
    Binlog_sender writes events from the binary log to a packet buffer, then
    sends the packet to the slave. The packet buffer is kept between events.
    
    Before an event is written to the buffer, if the event is bigger than
    the current allocated size of the buffer, the buffer is reallocated. To
    keep reallocations few, it grows to at least twice the size.
    
    To prevent that the buffer stays big forever just because there was one
    big event, the buffer shrinks when events are small again.
    
    To prevent that the buffer grows and shrinks often, it shrinks to half
    the size if 100 events in sequence are smaller than half the buffer
    size.
    
    Problems
    --------
    
    P1) The buffer shrink procedure is not working as expected.
    
    The buffer is not shrinking to half the size if 100 events in sequence
    are smaller than half the buffer size.
    
    P2) The buffer might be reallocated by Log_event::read_log_event().
    
    As the packet buffer is pre-allocated before loading the event, the
    buffer should never be reallocated by Log_event::read_log_event().
    
    Analysis
    
    P1)
    
    Due to a typo in the code, the buffer shrinks to 4096 bytes when 100
    events in sequence are smaller than 4096 bytes.
    
    Also, if one event in 100 is at least 4097 bytes big, the buffer will
    never shrink.
    
    P2)
    
    The Binlog_sender uses String::append(IO_CACHE, size) to load the body
    part of the event into the (packet) buffer.
    
    The issue happens when the buffer has BS bytes allocated and the event
    size is ES = BS - 1, BS is a value aligned by 8 bytes.
    
    So, when an event of size ES = BS - 1 is going to be loaded to a buffer
    with BS bytes of allocated size (BS = ES + 1), the Binlog_sender expects
    no changes in the buffer size (or pointers) as 1 (OK) + ES <= BS.
    
    The packet buffer is always initialized with a 0 to sign a OK packet,
    making packet->m_length= 1.
    
    Then, Log_event::read_log_event appends LOG_EVENT_MINIMAL_HEADER_LEN (19
    bytes), making packet->m_length= 20.
    
    Finally, Log_event::read_log_event loads the rest of the event content
    into the buffer, calling String::append(IO_CACHE, ES - 19).
    
    String::append is then calling String::mem_realloc(m_length +
    append_size), or (20 + ES - 19 = 1 + ES) doing the math. The current
    buffer is enough to hold the event (BS = ES + 1), but there is an "+ 1"
    used at the new desired buffer "len" calculation (to store a new \0 for
    the string) using ALIGN_SIZE that will make the buffer to grow 8 more
    bytes, producing the packet buffer re-allocation.
    
    Fix
    ---
    
    Separated growth and shrink into distinct functions by creating
    Binlog_sender::calc_shrink_buffer_size and renaming
    Binlog_sender::calc_buffer_size as Binlog_sender::calc_grow_buffer_size.
    
    Changed Log_event::read_log_event(IO_CACHE*, String*, ...) making it to
    read the event content directly from the I/O cache to the packet buffer
    instead of calling String::append().
    
    Added a test case to verify the buffer growth and shrink.

commit fbb12ba5d33000dcdaff699b6d90cf85667c5b11
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Tue Sep 20 08:59:08 2016 +0100

    BUG#24693798 PARTIALLY FAILED USER MANAGEMENT STMT FAILS TO CONSUME
                 GTID ON BINLOGLESS SLAVE
    
    Problem:
    
    The partially failed CREATE USER, RENAME USER and ALTER USER statements
    does not consume a specified gtid when binary log is disabled.
    
    Analysis:
    
    All above mentioned statements can be partially failed when handling
    multiple users, and a partially failed statement that is written to the
    binary log when the binary logging is enable should consume a
    specified gtid when GTID_NEXT is set and binary logging is not enabled.
    
    Fix:
    
    To fix these wrong behaviors, make a partially failed CREATE USER,
    RENAME USER and ALTER USER to consume the specified gtid and save
    the gtids into @@GLOBAL.GTID_EXECUTED (and mysql.gtid_executed table)
    when binlog is disabled as it does when binlog is enabled.

commit e41cbb049963ce790018588b55d9f4a2c28ce60b
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Tue Apr 19 16:44:39 2016 +0100

    Bug#22255698 INAPPROPRIATE LIST ITERATOR USAGE IN 'INIT_GTID_SETS()'
    
    Problem:
    
    When issuing a CHANGE MASTER for a channel that doesn't exist yet, the
    init_gtid_set() function is called to compute the retrieved GTID set of
    a replication channel that doesn't have relay log files.
    
    In this case, when going to parse the relay log for incomplete
    transactions, the function uses a reverse list iterator for the relay
    log file names, incrementing it when already pointing at the being of
    the list and decrementing it when pointing at the end.
    
    Also, the reverse iterator pointing at begin/end was used to search the
    file name on a list.
    
    Fix:
    
    Only do the parsing for incomplete transactions if there are files in
    the relay log for the channel.
    
    Added also some asserts to verify the proper behavior.

commit dd452c42d9f79c49c21a74ede8709c01ee56f140
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Tue Nov 22 13:26:12 2016 +0100

    Bug#24595612 DEBUG ASSERTION HIT IN ITEM_FIELD::USED_TABLES_FOR_LEVEL
    
    ANALYSIS
    --------
    For UNION, lacking initialization of
    
    a)  st_select_lex_unit::table->pos_in_table_list
        to point to
    
            st_select_lex_unit::result_table_list
    
        which is the materialization table for the UNION.
    
    and
    
    b)  for st_select_lex_unit::result_table_list->select_lex.
    
    The caused trouble in Item_field::used_tables_for_level which presumes
    pos_in_table_list (and the select_lex) are never null.
    
    FIX
    ---
    
    a) We have a TABLE_LIST for the UNION result materialization table, we just need
    to assign in to st_select_lex_unit::table->pos_in_table_list,
    
    a) We can assign the fake_select_lex to TABLE_LIST::select as it holds the
    proper level information.
    
    [proposed by Roy]
    
    Repro tests added.
    
    Change-Id: Ic04773aa3885355485b3b01e50a575d3ca0e441d

commit 18d645ccc22078e2299efaa5bea31e80853f2fa1
Merge: 682bcb8 edb3c3a
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Nov 23 11:56:28 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit edb3c3ae501d1da269caf7930fd5f231d39658d3
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Tue Sep 20 07:51:37 2016 +0200

    Bug#25126961	PORT REFACTORED DEBIAN/UBUNTU PACKAGING FROM 5.7 TO 5.6
    
    Deb packaging is now cmake-based, using a single set of source files in
    packaging/deb-in instead of separate files for every supported platform.

commit 682bcb8581fcfe89473f10a507ff4eff29fbec49
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Tue Nov 22 19:33:13 2016 +0100

    Bug #25119886: MAKE MYSQLXTESTS FAIL ON NOT EXPECTED ERROR (OPT_FATALERROR=TRUE)
    
    post-push fix: removing unnecessary code

commit b7ab083f429d36fb977fe5eaf8cdf57a008ccd2a
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Nov 18 12:57:49 2016 +0100

    Bug #25119886: MAKE MYSQLXTESTS FAIL ON NOT EXPECTED ERROR (OPT_FATALERROR=TRUE)
    
    Description:
    -----------
    The default behaviour of mysqlxtest should be changed. The test script
    execution should be immediately stopped at the first not expected result.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 14655

commit 1c56209120238f533c7a5cb6d9046b4d7ad4e7c1
Author: Vikram G <vikram.gg@oracle.com>
Date:   Tue Nov 22 18:57:27 2016 +0530

    Bug#24315750 WL9053 ADD MTR TESTS RELATED TO BASIC DDL/DML
                 OPERATIONS ON GR USING XPLUGIN
    
    This test checks the basic functionality of group replication plugin along
    with mysqlx plugin.
    
    RB : 13403
    
    Bug#24391824 ADD MTR TEST TO SET AND VERIFY THE GR VARAIBLES USING X PROTOCOL
    
    Basic test to set the GR variables and verify if the GR variables are
    set correctly using xplugin (x protocol)
    
    RB : 13552
    
    Bug#24414037 ADD MTR TEST TO CHECK BASIC CRUD OPERATIONS
                 ON DOCUMENT TYPE WITH GR
    
    This test checks the basic functionality(CRUD operations) of group
    replication plugin along with mysqlx plugin.
    
    RB : 13594

commit 95fc243ebbad81df6c39482017064313d021e2ec
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 22 12:11:05 2016 +0100

    Bug#25040566 USE WHITELIST INSTEAD OF FILTER FOR MYSQL_CONFIG COMPILE OPTIONS
    
    Post-push fix: remove some debug output from cmake.
    
    Change-Id: If3a9fea984faccaee700cf99c21723b29568bfa8

commit 05eafdbdcf53ca6d3a63f9e34af0fa449b7dfbac
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Tue Nov 22 14:35:16 2016 +0800

    Bug#23044098 INSERT OF GIS DATA INTO RTREE HITS ASSERT IN
    RTR_CUR_RESTORE_POSITION_FUNC()
    
    This bug is caused by missing page number field when store btree cursor.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
    RB: 14617

commit 77cee6fcc5868af31e0bf3ad4921922e48894b70
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Nov 21 23:37:39 2016 +0530

    Bug #23481444   OPTIMISER CALL ROW_SEARCH_MVCC() AND
                    READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
    
    - Added prebuilt->m_end_range check in row_search_mvcc().
    
    RB:14634

commit b70739dd0c5add46c4258ff8378bc2629932046b
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Nov 17 12:37:37 2016 +0100

    BUG#25071492: SERVER SESSION ASSERT FAILURE ON SERVER RESTART
    
    SQL service abstraction provided by Sql_service_interface class was
    ignoring open session return status. That was causing assert
    failures during Sql_service_interface destructor on threaded
    sessions. Sessions were being attempted to be destroyed, despite
    their non existence.
    
    To solve the above issue, the open session return status on
    Sql_service_interface are now considered.

commit df4a04b42a29cdc81dfe360951e416c33099482b
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Nov 21 15:34:06 2016 +0530

    Bug #23481444   OPTIMISER CALL ROW_SEARCH_MVCC() AND
                    READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
    
    - Fixing Doxygen build failure.

commit 7109457660e2fee99b6fb3e8587709d7fdd1b695
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Nov 21 11:49:20 2016 +0530

    Bug #23481444   OPTIMISER CALL ROW_SEARCH_MVCC() AND
                    READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
    
    Problem:
    =======
    row_search_mvcc() does whole table traversal for range query even though the
    end range is passed. Whole table traversal happens when the record is not
    with in transaction read view.
    
    Solution:
    ========
    Convert the innodb last record of page to mysql format and compare
    with end range if the traversal of row_search_mvcc() exceeds 100, no ICP involved.
    If it is out of range then InnoDB can avoid the whole table traversal.
    
    Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
    Reviewed-by: Knut Hatlen<knut.hatlen@oracle.com>
    RB: 14634

commit b14fad431c7d24f81dc840d9754cdf9fa2256cd7
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Nov 21 08:30:33 2016 +0530

    Bug #23596760: FORCE INDEX IS SKIPPED WHILE EXECUTING
                   SELECT COUNT(*)
    
    
    Issue:
    ------
    After WL6742, using secondary index for SELECT COUNT(*) has
    been replaced by a single call to the handler
    (ha_innobase::records()). This function counts the
    clustered index and returns the number of records.
    
    This may not be the most optimal in some cases (for example
    average row size is large making the clustered index also
    large, but with a smaller secondary index). The user can't
    use FORCE INDEX syntax to override the call to
    handler::records.
    
    Solution:
    ---------
    When FORCE INDEX is specified optimizer doesn't use the
    WL#6742 optimization and pick the suggested index.

commit 5ed9c1c52c93b3fb48bd1367b24f40a8fcef9dc3
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 16 14:01:42 2016 +0100

    Bug#25040566 USE WHITELIST INSTEAD OF FILTER FOR MYSQL_CONFIG COMPILE OPTIONS
    
    Remove blacklist of options entirely.
    Add (mostly empty) whitelist of options to pass to mysql_config and pkg-confit.
    Change-Id: Ic9574f0a03b3f9150bc99d7be0a3c0936a920fa5

commit 616c85f600817cc9073d85ea8db7077f5ec33b0d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 17 14:46:40 2016 +0100

    Bug#25111489 GROUP REPLICATION BREAKS CMAKE --DFOO=SYSTEM BUILD
    
    Change-Id: Ibaa0fad470ed3b1f5a89ea020cff2b38901568e1
    Fix: include compile_flags.cmake
    Also: fix broken unit test build for -DWITH_LIBEVENT=system

commit dd05ec9d8df630e236d42c16ba6b44179b8c338d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 17 12:08:27 2016 +0100

    Bug#25110808 KEYRING UNIT TESTS: ADD UNIT TEST AS OPTIONAL TARGETS WHEN MERGE_UNITTESTS=1
    
    Problem: To build an individual unit test one has to configure with
    MERGE_UNITTESTS=0 which increases compile times and disk usage
    considerably.
    
    Solution: Always add the unit test binary targets, but mark them as
    optional when MERGE_UNITTESTS=1, and only add the unit test binaries
    to ctest when MERGE_UNITTESTS=0.
    
    Change-Id: I4b1ea9e1ae76905afae113fe1acb3ba1885db66e

commit 54ae129b6cfd61c80731afebc6532012aee18bba
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Fri Nov 18 15:52:10 2016 +0100

    BUG#25083408: GROUP_REPLICATION.GR_SINGLE_PRIMARY_READ_WRITE_AUTO_SETTING FAILS ON DAILY-TRUNK
    
    Faling test on PB2 with a mismatch on diff tables.
    
    After analyse of logs a network error occurred.
    
    Improved test members synchronization.

commit 77ac3ea3f3447e7ddf0cfadb08029da5ec30f830
Merge: d5863db 0d8d766
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Nov 18 13:20:09 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0d8d766fbc3d955500d09e97e57a9ebc8cf207f5
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Nov 18 13:19:04 2016 +0530

    Bug#23532304 : SECONDS_BEHIND_MASTER REPORTS IO_THREAD TIME WHEN USING
        MTS & ROTATING RELAY-LOG
    
        Problem: The value of 'Seconds_Behind_Master' (SBM) reports
        distorted number when rotating a relay-log.
    
        Analysis: The issue is happening only on MTS enabled Slaves.
        The distorted number is coming while the Slave is executing
        fake rotate events. Fake rotate event (=which does not exist
        physically in any binlog) is a rotate event, which contains
        the name of the binlog Master is going to send to the slave
        (because the slave may not know the binlog name if it just
        asked for MASTER_LOG_FILE='', MASTER_LOG_POS=4). These events
        contains zero in it's even time stamp value which will be
        replaced by Slave's during the execution with I/O thread's
        time. If SBM is calculated while these fake rotate events
        are executing, the SBM value end up in getting big number
        which confuses the users.
    
        Fix: For Single thread slaves, Slave server is already
        ignoring to set the last master_time stamp (which is used
        to calculate SBM) if the event is fake/artificial event by
        using is_artificial_event() function. Now with this patch,
        Slave will ignore these fake/artificial rotate events even
        in MTS execution path as well.

commit d5863db02a955eb9c5be24e4afdb4fe028790b5a
Author: Dhruthi K V <dhruthi.k.v@oracle.com>
Date:   Fri Nov 18 10:56:02 2016 +0530

    Bug#25039567 GROUP_REPLICATION.GR_PARALLEL_INSERT IS UNSTABLE ON PB2
    
    gr_para11el_insert and gr_autoincrement_parallel_insert tests fail
    sporadically on windows.
    
    Fix:
    Sync group members before validating data.

commit ec8601f166006df651cb36927082ad3a63233a0f
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Wed Jun 29 10:51:20 2016 +0200

    Bug#25103242: 5.6 DOES NOT BUILD ON FEDORA 25 DUE TO READDIR_R BEING DEPRECATED
    
    Backport from trunk to 5.6 of:
    
    Bug#23708395: GLIBC 2.24 DEPRECATES READDIR_R() BREAKING
                  DEBUG BUILD OF MYSQL SERVER
    
    As of glibc 2.24, readdir_r() has been deprecated. This breaks
    our debug builds since the deprecation warning is upgraded to
    an error during compilation.
    
    This patch fixes the problem by removing use of readdir_r() and
    using readdir() instead. This is thread safe as long as readdir()
    is only used concurrently on different DIR* - which it is in
    our case.
    
    POSIX quote: "The pointer returned by readdir() points to data
    which may be overwritten by another call to readdir() on the same
    directory stream. This data is not overwritten by another call
    to readdir() on a different directory stream."
    
    Change-Id: I85a6f5da2d48c8d5a9804cd6281411d9e757f46c
    (cherry picked from commit ba5245e9fef2257d60213076598268f544ca7109)
    (cherry picked from commit 865c124d1bdfd4eeee5eb42ea9faa9c8b45bfbb0)
    (cherry picked from commit d083887ca7cf90ac370b1a564b5090358f9a097f)

commit 7939fdd14b672e1ff71221fcd06518def2fa29a4
Merge: 309c254 d083887
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Wed Nov 16 15:18:19 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit d083887ca7cf90ac370b1a564b5090358f9a097f
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Wed Jun 29 10:51:20 2016 +0200

    Bug#25103242: 5.6 DOES NOT BUILD ON FEDORA 25 DUE TO READDIR_R BEING DEPRECATED
    
    Backport from trunk to 5.6 of:
    
    Bug#23708395: GLIBC 2.24 DEPRECATES READDIR_R() BREAKING
                  DEBUG BUILD OF MYSQL SERVER
    
    As of glibc 2.24, readdir_r() has been deprecated. This breaks
    our debug builds since the deprecation warning is upgraded to
    an error during compilation.
    
    This patch fixes the problem by removing use of readdir_r() and
    using readdir() instead. This is thread safe as long as readdir()
    is only used concurrently on different DIR* - which it is in
    our case.
    
    POSIX quote: "The pointer returned by readdir() points to data
    which may be overwritten by another call to readdir() on the same
    directory stream. This data is not overwritten by another call
    to readdir() on a different directory stream."
    
    Change-Id: I85a6f5da2d48c8d5a9804cd6281411d9e757f46c
    (cherry picked from commit ba5245e9fef2257d60213076598268f544ca7109)
    (cherry picked from commit 865c124d1bdfd4eeee5eb42ea9faa9c8b45bfbb0)

commit 309c25474ee3eaaa7ce732b554db486142bc4c8a
Merge: 91c872c 0018928
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Nov 16 14:21:47 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 00189280432ac459d657417f7ec42aed651d5ec0
Merge: 3c8215b 8add15e
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Nov 16 14:11:02 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 8add15eadf2dea826562ca5ffc40b0c79d3b2799
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Wed Nov 16 13:41:27 2016 +0100

    Bug#25088048 ADDITIONAL ISSUES IN MYSQLD_SAFE
    
    Don't read --ledir option from config file.
    Ignore current working for finding location of mysqld
    Remove use of chown/chmod in scripts.
    Be helpful only when basedir is /var/log or /var/lib.
    Removed unused systemd files for SLES.
    Set explicit basedir in scripts.

commit 91c872ca5cb9a896d743b28b5beb2c6ed3c47819
Merge: 2acc418 3c8215b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 16 12:26:13 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 3c8215b59ccc004df09ac31ae65e44b18b748c2c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 16 11:34:05 2016 +0100

    Bug#24624555 DEBUGPRINTDEATHTEST.PRINTEVAL UNIT TEST FAILS ON AARCH64.
    
    Commit 5c2b61d has brought two unit tests (DebugPrintTest and
    DebugPrintDeathTest) that use "division by zero" exception to check
    the evaluation of args of DBUG_PRINT macro.
    
    About division by zero C99 says in 6.5.5p5: "... if the value of the
    second operand is zero, the behavior is undefined".
    
    Also, according to the ARMv8 Architecture Reference Manual if the
    divisor is zero, the result of operation is zero and no exception is
    generated. Consequently, DebugPrintDeathTest.PrintEval test fails and
    DebugPrintTest always passes at least on Aarch64.
    
    Fix: do not use undefined behaviour to test DBUG macros.
    
    The patch is based on a contribution by Alexey Kopytov

commit 2acc418ffda762d59ef79b9342798599c8eb08b5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 11 14:15:55 2016 +0100

    Cherrypick commit 261f6d54f16f5348c08849da570b6786c15af65a
    
    WL#7575 Remove ndbinfo's usage of other engine
    
     - fix problem with multiple definition of "BlockNames"
       and "NO_OF_BLOCK_NAMES" when linking libmysqld(the embedded mysqld)
     - The two variables were defined both in libndbapi and libndbtrace
     - split the two variables into their own file, allowing libndbapi
       to reference the variables from libndbtrace
     - fix ancient copyright headers

commit b4dbfcedf898c66a225a1e843d6f7f8e9be15241
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 9 15:37:45 2016 +0100

    Bug#24947136 ENABLE DEVELOPERSTUDIO12.5 WITH C++03 FOR MYSQL 5.7
    
    This patch adds support for building mysql5.7 server (including NDB)
    with -std=c++03
    
    cmake/os/SunOS.cmake partial backport of
    Bug#24481181: RAISE MINIMUM CMAKE VERSION TO 2.8.12
    
    configure.cmake partial backport of
    Bug#24487934 FIX DYNAMIC LIBRARY SEARCH PATHS ISSUES ON SOLARIS

commit 5e827ab8f627a6cdd8109d64873a91c7dfcd3b49
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Oct 24 13:24:07 2016 +0200

    Bug#22561096 UPGRADE TO CMAKE 3.2.3 BROKE NDBCLUSTER WINDOWS BUILD IN MYSQL-TRUNK
    Bug#22572632 CMAKE WARNING IN NDB_CHECK_MYSQL_INCLUDE_FILE.CMAKE
    
    Backport to 5.7

commit 3fbdcbce7c14a800809427c19476435c6ed8f73a
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Nov 15 12:01:05 2016 +0530

    Bug#22857926: ASSERTION `! IS_SET()' AT SQL_ERROR.CC:38 IN
    READ_ONLY MODE FOR MANY RPL CMDS.
    
    Problem:
    =======
    This bug is opened to fix assertion `! is_set()' at
    sql_error.cc:380 in "void Diagnostics_area::set_ok_status
    (ulonglong, ulonglong, const char*)" for many RPL commands.
    This issue has been fixed for couple of commands with
    Bug#22097534. But, still issue exists for few other
    commands.
    
    RPL commands affected:-
    =======================
    [PENDING] 1. FLUSH LOGS;
    [PENDING] 2. RESET SLAVE ALL;
    [PENDING] 3. SET GLOBAL gtid_purged='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
    [FIXED]   4. CHANGE MASTER TO..
    [FIXED]   5. CHANGE REPLICATION FILTER
    [FIXED]   6. START SLAVE;
    [FIXED]   7. STOP SLAVE;
    
    Analysis:
    ========
    When the above set of commands are executed they will try
    to update replication specific system tables. For example
    mysql.gtid_executed
    mysql.salve_master_info
    mysql.relay_log_info
    
    This scenario is applicable to all replication specific
    internal system tables. During the fix for Bug22097534 it
    was concluded that "read only" mode should prevent changes
    to user data, but not to prevent normal Server operations or
    to prevent a DBA from managing the state of the MySQL Server
    itself.
    
    Hence the above commands should be able to update data in
    replication specific internal tables.
    
    Fix:
    ===
    There exists a flag named 'ignore_global_read_lock' whose
    intention is to ignore the read only option and allow
    commits to replication specific system tables. Reused
    this flag as part of fix. If this flag is set then the
    additional check for 'read only' option is not done.
    Hence 'read only' mode error will not be reported and
    command will complete successfully.

commit 8823f019bec265596b7bf53e936130b5b506b287
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Sun Nov 13 10:31:35 2016 +0530

    BUG#25082593 FOREIGN KEY VALIDATION DOESN'T NEED TO ACQUIRE GAP LOCK
                 IN READ COMMITTED
    
    Problem :
    ---------
    This bug is filed from the base replication bug#25040331 where the
    slave thread times out while INSERT operation waits on GAP lock taken
    during Foreign Key validation.
    
    The primary reason for the lock wait is because the statements are
    getting replayed in different order. However, we also observed
    two things ...
    
    1. The slave thread could always use "Read Committed" isolation for
    row level replication.
    
    2. It is not necessary to have GAP locks in "READ Committed" isolation
    level in innodb.
    
    This bug is filed to address point(2) to avoid taking GAP locks during
    Foreign Key validation.
    
    Solution :
    ----------
    Innodb is primarily designed for "Repeatable Read" and the GAP lock
    behaviour is default. For "Read Committed" isolation, we have special
    handling in row_search_mvcc to avoid taking the GAP lock while
    scanning records.
    
    While looking for Foreign Key, the code is following the default
    behaviour taking GAP locks. The suggested fix is to avoid GAP
    locking during FK validation similar to normal search operation
    (row_search_mvcc) for "Read Committed" isolation level.
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
    
    RB: 14526

commit 628f957a874dfcdc5431c52a39b5363c13a1fdba
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Sat Nov 12 20:53:15 2016 +0530

    BUG#25032066 PREPARED TRANSACTION SHOULD NOT BE ROLLED BACK
                 BY HIGH PRIORITY TRANSACTION
    
    Problem :
    ---------
    1. delete_all_rows() and rnd_init() are not returning error
    after async rollback in 5.7. This results in assert in
    innodb in next call.
    
    2. High priority transaction is rolling back prepared transaction.
    This is because TRX_FORCE_ROLLBACK_DISABLE is getting set only for
    first entry [TrxInInnoDB].
    
    Solution :
    ----------
    1. return DB_FORCED_ABORT error after rollback.
    2. check and disable rollback in TrxInInnodb::enter always.
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
    
    RB: 13777

commit 1b16141549b83d9d2254865aa0cc99c03a79151f
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Wed Nov 2 16:02:52 2016 +0000

    BUG#24971129 - MACRO REDEFINITION IN XCOM
    
    From problems that GR encoutered when entering the server main trees,
    one decided to make a full revamp of the CMake files in order to use
    the most one can from the Server build infrastructure.
    
    For that, one redesigned the CMake from Group Replication in order
    to build all its code in one single file

commit 467262e1d44762aee866a1420c3ba48422febd38
Author: Pedro Gomes <pedro.gomes@oracle.com>
Date:   Thu Nov 10 23:43:55 2016 +0100

    Bug#24969065: MEMBER IS NOT MOVING TO ERROR STATE UPON SQL_THREAD FAILURE
    
    After user executed restarts on the group replication applier SQL thread the plugin
    could no longer detect when that thread stops due to an error.
    This was due to the old detection mechanism that relied on cached thread ids.
    
    To solve this issue, the new detection mechanism simply checks the
    channel name to check if it was the group replication applier thread
    that failed.

commit a0a12afb1a11a597e99413540e448a74ffa9e95e
Merge: 56b214a 997725f
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Thu Nov 10 19:29:16 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    Conflicts:
    	tests/mysql_client_test.c

commit 997725f2e926d0bd7634107dc42fdb2675ee953f
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Thu Nov 10 19:21:10 2016 +0100

    Bug #24712909 : Removing innodb check

commit 56b214a8206d9319b790745f2c27721249c498d3
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Nov 10 12:51:21 2016 +0100

    BUG#25075929: GROUP_REPLICATION.GR_EXECUTED_SETS_COMPATIBILITY FAILS ON DAILY-TRUNK
    
    Test group_replication.gr_executed_sets_compatibility was
    sporadically failing on PB2 with:
    Test assertion failed: The second member to join has 4 transactions
    Dumping debug info:
    Assertion text: 'The second member to join has 4 transactions'
    Assertion condition: '"[SELECT @@GLOBAL.GTID_EXECUTED]" =
    "b2b6cdc0-eb94-11e5-a837-0800200c9a66:1-4";'
    Assertion condition, interpolated:
    '"b2b6cdc0-eb94-11e5-a837-0800200c9a66:1-3" =
    "b2b6cdc0-eb94-11e5-a837-0800200c9a66:1-4";'
    Assertion result: '0'
    
    This is due to the fact that the test was not waiting for
    transaction UUID:4 to be logged on the binary log, that is, UUID:4
    is the id of the View_change_log_event of server 2 join attempt, the
    test was immediately stopping server 1 which could happen before
    that transaction reach binary log.
    
    To avoid that, the test now does wait until UUID:4 is logged on the
    binary log.

commit 3b5550b7aecc4e41c50a47cba5d87e8882ea40a9
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Wed Nov 9 15:41:46 2016 +0000

    BUG#25050514: IF MEMBER IS IN ERROR STATE DUE TO ER3092 IT DOESN'T GO OFFLINE ON STOP G.R. CMD
    
    If member is in ERROR state due to ER3092, it doesn't go to OFFLINE
    state.
    
    Missing the set of OFFLINE state when failing on plugin start.

commit d45841ef7d8ca04779a113e1c4c5766c035f8a64
Author: Deepa Dixit <deepa.dixit@oracle.com>
Date:   Thu Nov 10 16:58:00 2016 +0530

    Bug#21482542: SOME TESTS FAIL ON WIN WHEN RUN WITH
                  INNODB_UNDO_TABLESPACES 2
    
    Issue:
    ------
    A couple of tests: main.secure_file_priv_win and
    i_main.bug11761752 were failing on Windows with a result
    content mismatch because '\'s were being replaced with '/'s.
    
    Fix:
    ----
    The reason for this replacement of slashes was because of
    the name of the vardir in the run: innodb-undo-2-debug.
    There is a function in MTR, called during --replace_result,
    which replaces slashes if it finds a special pattern in the path.
    The list of special patterns defined, also contained "undo".
    Now, the name of the vardir has been changed.
    
    Reviewed-by: Anitha Gopi <anitha.gopi@oracle.com>
    Reviewed-by: Georgi Kodinov <georgi.kodinov@oracle.com>
    RB: 14355

commit f5f678aafdf4033f82b356e10abd508b31c010e3
Merge: a00434c d43f6e9
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Thu Nov 10 15:15:08 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit d43f6e95d3be0f6acd906f0cf7bea5654c80985a
Merge: f7bd942 8d5c02c
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Thu Nov 10 15:13:48 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 8d5c02c624a01042bad0355adc1b4f9459b1aa81
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Thu Nov 10 15:11:57 2016 +0530

    BUG#24437124: POSSIBLE BUFFER OVERFLOW ON CREATE TABLE
    
    ANALYSIS:
    =========
    'CREATE TABLE' query with a large value for 'CONNECTION'
    string reports an incorrect error.
    
    The length of connection string is stored in .frm in two
    bytes (max value= 65535). When the string length exceeds
    the max value, the length is truncated to fit the two
    bytes limit. Further processing leads to reading only a
    part of the string as the length stored is incorrect. The
    remaining part of the string is treated as engine type and
    hence results in an error.
    
    FIX:
    ====
    We are now restricting the connection string length to 1024.
    An appropriate error is reported if the length crosses this
    limit.
    
    NOTE:
    =====
    The 'PASSWORD' table option is documented as unused and
    processed within a dead code. Hence it will not cause
    similar issue with large strings.

commit a00434c98a1e5e1460bd3eb33932ea7f840aad5a
Merge: 265257f f7bd942
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Wed Nov 9 19:34:36 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit f7bd942849bcf19286cadae1681a1d8790f73455
Merge: f6967fe 6b23c38
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Wed Nov 9 19:31:15 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 6b23c389b2e71dbc9582140e1e50a84769d9cb49
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Wed Nov 9 19:27:35 2016 +0100

    Bug#22874167 : fix for MAIN.LOG_TABLES-BIG UNSTABLE ON LOADED HOSTS

commit 265257feb4543da4fa7954ca657f7de2d9b2d32c
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Nov 9 16:53:46 2016 +0530

    Bug#24384561 - 5.7.14 COMPLAINS ABOUT WRONG
                   SLAVE_MASTER_INFO AFTER UPGRADE FROM 5.7.13
    
    Post push fix to fix the test script issue.

commit d78bb00532032355fc29af70012422d6ede9e992
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Nov 9 10:47:06 2016 +0100

    BUG#25055190: FLOW-CONTROL APPLIER QUEUE SIZE INCORRECT IN JOINS ON BUSY GROUPS
    
    When a new member joins a group that is busy, one of the statistics
    used by the flow-control - applier queue size - may be incorrectly
    calculated. This comes from the fact that the queue size is
    incremented once the transaction is queued into the relay log, but
    it is only decremented when executing if the member is considered
    ONLINE. If the member is on RECOVERING status, the queue size is
    not decremented.
    To fix the above issue, the applier queue counters are only
    incremented and decremented when member status is ONLINE.
    The certifier queue counter it is always sent, to avoid the
    throttling to reach to small values when one or more members are on
    RECOVERING, we cap the throttling to 5% of the queues threshold
    specified by DBA on
    group_replication_flow_control_certifier_threshold and
    group_replication_flow_control_applier_threshold options.
    
    A second issue was observed on flow control disable, which was not
    enforcing its immediate disable. Now when the low control is disable,
    it does reset its used quota which ensures immediate throttling
    disable.

commit f3587994a4024a836d05fa30bb2272930f99e625
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Tue Sep 29 16:48:48 2015 +0600

    BUG#20488921 - error propagation does not fully work in xa
    
    This bug related to incomplete cleaning up of a transaction state in
    case an error happen on calling either ha_commit_low() or TC_LOG::commit().
    In this case the data member thd->m_transaction_psi wasn't set to NULL
    that led to an assertion fired while handling any next statement.
    That means this bug related only debug built of the server.
    
    To fix the bug the data member thd->m_transaction_psi is set to NULL
    in case error returned from either ha_commit_low() or TC_LOG::commit().
    
    (cherry picked from commit 314f1a5697fcc9f73062433143f75905b54c4867)

commit e789e05c32e379f2e114262f78e71462e336e603
Merge: 5b26916 f6967fe
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Nov 9 07:23:39 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit f6967fe2afa1b4063f9f64f5e3d5a13a490da942
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Nov 9 07:22:02 2016 +0530

    Bug #21749123: SELECT DISTINCT, WRONG RESULTS COMBINED WITH
                   USE_INDEX_EXTENSIONS=OFF
    
    Issue:
    ------
    CREATE TABLE testtable (
     fielda INTEGER NOT NULL,
     fieldb INTEGER NOT NULL,
     fieldc INTEGER NOT NULL,
     PRIMARY KEY (fielda,fieldb),
     KEY fieldb_idx (fieldb)
    ) ENGINE=Innodb;
    
    SELECT DISTINCT fieldb
    FROM testtable
    WHERE fielda IN (...) AND fieldb IN (...);
    
    With index extensions turned off, fielda shouldn't be used
    as part of fieldb_idx. So when the query tries to use loose
    index scan on fieldb_idx, the corresponding range tree for
    the lookup doesn't contain fielda. Since this approach
    involves a lookup of the index fieldb_idx, we get a wrong
    result.
    
    Solution:
    ---------
    Loose index scan is the wrong choice for this query given
    that fielda is not covered by fieldb_idx when
    index_extensions is turned off.
    
    Each field has a flag, part_of_key_not_clustered which
    tracks the indexes that cover the field. When index
    extensions is turned off, this flag can be used to track
    whether a particular field is part of the secondary index
    or is part of the primary key that has been appended by the
    storage engine..

commit 5b2691658185d954377a44774281f6f5d9e71f2d
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Nov 7 16:03:10 2016 +0000

    BUG#24957262: MEMORY LEAKS ON MYSQL-TRUNK-WL9053
    
    Memory leaks have been detected on pb2 branch on mysql-trunk-wl9053.
    
    A test made a group replication stop after a transaction event. No one
    was releasing  the memory.
    
    Added delete on destructor of certification handler.

commit 199ec75d7c9eb25b8d10f108c5eda6fdf94936a9
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Nov 8 15:52:59 2016 +0530

    Post fix submission to fix a test script issue.

commit 893cc840112252d6110759b9f43f6d7b80c4ee33
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Oct 21 15:35:29 2016 +0530

    Bug#24432199 MTR'S INTERNAL CHECK OF THE TEST CASE 'MAIN.MYSQL_UPGRADE' FAILED
    
    When a sys schema entity is re-created, the entry in mysql.user and
    mysql.tables_priv tables is done again and this changes the timestamps
    in these tables. The test 'main.mysql_upgrade' does the above operation
    and hence, the checksum of the two tables differ and MTR's check of the
    testcase fails. A backup of the tables mysql.user and mysql.tables_priv
    is taken and restored after the above scenario to resolve the issue.
    
    Reviewed-by: Mark Leith <mark.leith@oracle.com>
    RB: 14348

commit 81dde7ce218138694132344d6c04a4d93885938d
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Mon Nov 7 21:44:42 2016 +0530

    Bug#24923474 MTR: --SKIP-RPL SHOULD SKIP ALL REPLICATION TESTS AND NONE FROM OTHER SUITES
    
    Problem:
    --------
    Not all group replication tests are skipped when the --skip-rpl
    option is given to MTR. Also, if the absolute path to the MTR
    test suite contains the string 'rpl', all tests executed are
    identified as replication tests.
    
    Fix:
    ----
    Identify all tests in 'rpl*' and 'group_replication' suites as
    rpl_test's and grp_rpl_test's respectively by matching their
    suite names. Skip tests which are marked as rpl_test's or
    grp_rpl_test's when the --skip-rpl option is given to MTR.
    
    Reviewed-by: Pavan Naik    <pavan.naik@oracle.com>
    Reviewed-by: Nuno Carvalho <nuno.carvalho@oracle.com>
    RB: 14330

commit 84407083481e8d98751252fa87501ec27f87ec48
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Nov 4 13:44:36 2016 +0100

    Bug#25048573: STD::MAP INSTANTIATIONS CAUSE STATIC ASSERT FAILURES ON FREEBSD 11
    
    Problem: Some instantiations of std::map have discrepancies between
    the value_type of the map and the value_type of the map's allocator.
    On FreeBSD 11 this is detected by Clang, and an error is raised at
    compilation time.
    
    Fix: Specify the correct value_type for the allocators.
    
    Also fix an unused variable warning in storage/innobase/os/os0file.cc.

commit 35411127083e4bd1dcb112bd9f9cd05393531c00
Author: Pedro Gomes <pedro.gomes@oracle.com>
Date:   Mon Nov 7 19:52:15 2016 +0100

    Bug#24961512 NEW COMPILATION WARNINGS WITH GROUP REPLICATION PLUGIN
    
    With Clang compilation, there were some warnings in group replication
    code that are now fixed.

commit 249c59163a797ede2d77e9e3c3e05940e1f55087
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Fri Nov 4 12:05:29 2016 +0100

    Bug#25048128: MAP_NORESERVE NO LONGER DEFINED IN FREEBSD 11
    
    MAP_NORESERVE is no longer defined on FreeBSD 11
    which breaks the build.
    
    Fix: Reintroduce code from 5.6 that defines MAP_NORESERVE to 0
    if it doesn't exist.
    
    Change-Id: I22daeeca0584ed1d21c12135e9a1a166ce31cc07

commit 7cf9da90eb4f30c953e4feaf72f211a5d87b55cc
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Nov 7 16:47:54 2016 +0530

    Bug#24437009 : DEBUG ASSERTION WITH AUDIT LOG + BINARY
                   LOGGING ENABLED.
    
    Description: Server with binary log enabled crashes when the
    audit_log function, "audit_log_filter_set_filter" is
    executed.
    
    Analysis: Assertion failure occurs due to the missing
    transaction commit before calling "close_thread_tables()".
    
    Fix: Back ported BUG#24431547's fix from 8.0 to 5.7 without
    SE related changes.

commit 290d263c09fab15b25a3b04c39c4e217e71cf5b0
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Mon Nov 7 11:26:25 2016 +0100

    Revert "BUG#24431547 FIREWALL PLUGIN SHOULD BE CONFIGURABLE WITH INNODB ENGINE"

commit 7fda51cb1777cf0943d1283496600cb107b48629
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Nov 4 12:22:54 2016 +0100

    Bug#25048546	PACKAGE UPGRADE FROM 5.7.16-COMMUNITY TO 5.7.17-COMMUNITY FAILING
    
    When some files were moved from mysql-common to client package, a breaks/replaces
    statement was added on mysql-common older than 5.7.16, but since the commit didn't
    make it in until 5.7.17, the breaks/replaces needs updating.

commit b5d296221520bf94b62234a8f7efdfffcbb9e4a2
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Sun Nov 6 23:04:21 2016 +0100

    BUG#24431547 FIREWALL PLUGIN SHOULD BE CONFIGURABLE WITH INNODB ENGINE
    
    Problem:
    ========
    
    Some server configurations require MyISAM storage engine disabled. Audit log
    and firewall plugins support MyISAM engine availability for storing persistent
    data in tables. Unavailability of MyISAM engine prevents from using audit log
    and firewall plugins.
    
    Fix:
    ====
    
    Audit log and firewall plugins use InnoDB engine tables for storing persistent
    data. MySQL upgrade transforms audit log and firewall tables, if present,
    to use InnoDB.
    
    Reviewed-by:
    ============
    Kristofer Pettersson <kristofer.pettersson@oracle.com>
    Georgi Kodinov <georgi.kodinov@oracle.com>

commit 7e19cb419cbd43ec17050e8f007c22c459cf22a7
Merge: 0d842c1 d01b79f
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Sat Nov 5 17:07:53 2016 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit d01b79f27b2966ee740296e10da8a362e9c8a239
Merge: 33d986e7 b7bd2fc
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Sat Nov 5 17:00:53 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6
    
    Conflicts:
    	mysql-test/t/disabled.def

commit b7bd2fc1be6fe51f72db5167a1780c8364d32b0b
Author: Shipra Jain <shipra.x.jain@oracle.com>
Date:   Sat Nov 5 16:52:05 2016 +0100

    Bug#24918325: backport bug11756699 in this patch

commit 0d842c1cd4d4093caf2787c93a4ff0466c482c6f
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Nov 4 01:27:42 2016 +0100

    BUG#25045302: GROUP REPLICATION FAIL TO DETECT THAT PLUGIN IS NOT BUILT
    
    Make all Group Replication tests know that do need to skip when the
    plugin is not build, like when cmake -DWITH_RAPID=0 option is used.

commit 52e4a074b78ba072915ef8450be324b11d05007a
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Fri Nov 4 14:32:53 2016 +0100

    WL#9053: Group Replication
    
    Post-push fix:
    Avoid copying rpcgen generated files back to the
    source directory. This again makes it possible to
    use the same source directory on multiple platforms.

commit 41f206b7b13914001dc4e27910c2d517e2514340
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Nov 4 18:51:41 2016 +0530

    Bug#24384561 - 5.7.14 COMPLAINS ABOUT WRONG
                   SLAVE_MASTER_INFO AFTER UPGRADE FROM 5.7.13
    
    Description:
    Post push submission to fix the test script failure.

commit 6235076bd81ebea84179ed021ac952cd947ce63d
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Oct 28 13:37:57 2016 +0200

    Bug #25042426: CHANGING WAY OF UNIT TESTS EXECUTION FOR XPLUGIN BY CTEST
    
    The goal of this task is an execution of all xplugin unit test at one
    step. At this moment this execution is split into several steps.
    In each step, only small groups of tests are being executed.
    All unit test are linked in one binary file and it means that this
    binary is executed several times with different configuration.
    The goal is simplifying of unit tests execution and removing a step of
    generation unnecessary configuration files.
    
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 14489

commit e05658c1789c3240d484f206ba0ff8933e233aaa
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Thu Nov 3 12:28:36 2016 +0100

    Bug#25039800: COMPILE WARNINGS IN JSON CODE WHEN USING CLANG 3.9
    
    Problem: Clang 3.9 emits the following warning: "destructor called on
    non-final 'Json_path' that has virtual functions but non-virtual
    destructor"
    
    Fix: Add a virtual destructor to Json_path's base class.
    
    This fix is for mysql-5.7 only. The destructor is already virtual in
    mysql-trunk.

commit 2755fdadf81e1ea101d18ed41af06cc10d0bffce
Merge: 87159d8 33d986e7
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Nov 4 10:55:12 2016 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 33d986e719c7116d6300d893384ec74b7b1c0b9c
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Nov 4 10:52:13 2016 +0530

    WL#8885: Introduce a delay in authentication process
             based on successive failed login attempts
    
    Post push fix: fix for doxygen comments.

commit 87159d846e0b7362306e19b8cc58e5318f9aec8e
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Nov 2 16:37:24 2016 +0100

    BUG#24638038 - XPLUGIN PROCESS ID REALTED STATS NOT SHOWN IN PERFORMANCE SCHEMA.THREADS TABLE
    
    Post push fix
    
    RB: 14466
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>

commit 422c7d9ec7c48fa5ab09c9ad502e052711e1d7cb
Author: Robert Golebiowski <robert.golebiowski@oracle.com>
Date:   Wed Nov 2 09:24:14 2016 +0100

    Bug #23498254: KEYRING_FILE SHOULD NOT DUMP ITS CONTENT WHEN KEYRING
                FILE IS NOT AVAILABLE - fix for 5.7 based on file's stat
            fix for test gr_key_rotation part 2

commit ffb886bca7eb2a372c8b4f06311725d09afae017
Author: Robert Golebiowski <robert.golebiowski@oracle.com>
Date:   Tue Nov 1 09:06:38 2016 +0100

    Bug #23498254: KEYRING_FILE SHOULD NOT DUMP ITS CONTENT WHEN KEYRING
                   FILE IS NOT AVAILABLE fix for failing tests

commit ef50da774f426a584c5ab7dc46071a204199d6eb
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Mon Oct 31 17:36:19 2016 +0100

    Bug #24976417: Updated result files.

commit 9268af14d58006e9a7ae708f99b233461a9defce
Merge: 1efa1e8b 3240e07
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Oct 31 15:09:15 2016 +0100

    Raise version number after cloning 5.7.17

commit 3240e07a26ac94ae76b760050fcd65c8dfc39840
Merge: 797def9 6ded664
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Oct 31 15:04:31 2016 +0100

    Raise version number after cloning 5.6.35

commit 6ded66479f0d091e9b7cc5fa13cb0ba908cec46e
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Oct 31 15:01:19 2016 +0100

    Raise version number after cloning 5.5.54
